diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2015-02-19 16:41:22 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2015-10-06 09:09:23 +0100 |
commit | 735536dc5e269f2094d122e49f2c648928db4acb (patch) | |
tree | 5779c470d6f326828f0f587f76bfc0841c03144f /perllib/FixMyStreet/DB/Result/Body.pm | |
parent | d004b2df0c85615eab6924c35f478b45bdf84b2d (diff) |
[Zurich] Response templates for report admin.
This provides a ResponseTemplate model that an admin/staff
user can choose from when responding to problems.
For mysociety/FixMyStreet-Commercial#671.
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Body.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Body.pm | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Body.pm b/perllib/FixMyStreet/DB/Result/Body.pm index 0c1046cd8..a2e004c6a 100644 --- a/perllib/FixMyStreet/DB/Result/Body.pm +++ b/perllib/FixMyStreet/DB/Result/Body.pm @@ -18,12 +18,6 @@ __PACKAGE__->add_columns( is_nullable => 0, sequence => "body_id_seq", }, - "name", - { data_type => "text", is_nullable => 0 }, - "external_url", - { data_type => "text", is_nullable => 1 }, - "parent", - { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "endpoint", { data_type => "text", is_nullable => 1 }, "jurisdiction", @@ -42,8 +36,14 @@ __PACKAGE__->add_columns( { data_type => "boolean", default_value => \"false", is_nullable => 0 }, "send_extended_statuses", { data_type => "boolean", default_value => \"false", is_nullable => 0 }, + "name", + { data_type => "text", is_nullable => 0 }, + "parent", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "deleted", { data_type => "boolean", default_value => \"false", is_nullable => 0 }, + "external_url", + { data_type => "text", is_nullable => 1 }, ); __PACKAGE__->set_primary_key("id"); __PACKAGE__->has_many( @@ -87,6 +87,12 @@ __PACKAGE__->belongs_to( }, ); __PACKAGE__->has_many( + "response_templates", + "FixMyStreet::DB::Result::ResponseTemplate", + { "foreign.body_id" => "self.id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); +__PACKAGE__->has_many( "user_body_permissions", "FixMyStreet::DB::Result::UserBodyPermission", { "foreign.body_id" => "self.id" }, @@ -100,8 +106,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07035 @ 2014-07-29 13:54:07 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PhUeFDRLSQVMk7Sts5K6MQ +# Created by DBIx::Class::Schema::Loader v0.07035 @ 2015-02-19 16:13:43 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:d6GuQm8vrNmCc4NWw58srA sub url { my ( $self, $c, $args ) = @_; |