Bug 18936: (follow-up) Add cloning of circulation rules back to Koha
[koha.git] / Koha / Schema / Result / MessageAttribute.pm
blob8fc01b3f7e9d1428c8390f6f0fde45c873e2f022
1 use utf8;
2 package Koha::Schema::Result::MessageAttribute;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::MessageAttribute
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<message_attributes>
20 =cut
22 __PACKAGE__->table("message_attributes");
24 =head1 ACCESSORS
26 =head2 message_attribute_id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 message_name
34 data_type: 'varchar'
35 default_value: (empty string)
36 is_nullable: 0
37 size: 40
39 =head2 takes_days
41 data_type: 'tinyint'
42 default_value: 0
43 is_nullable: 0
45 =cut
47 __PACKAGE__->add_columns(
48 "message_attribute_id",
49 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
50 "message_name",
51 { data_type => "varchar", default_value => "", is_nullable => 0, size => 40 },
52 "takes_days",
53 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
56 =head1 PRIMARY KEY
58 =over 4
60 =item * L</message_attribute_id>
62 =back
64 =cut
66 __PACKAGE__->set_primary_key("message_attribute_id");
68 =head1 UNIQUE CONSTRAINTS
70 =head2 C<message_name>
72 =over 4
74 =item * L</message_name>
76 =back
78 =cut
80 __PACKAGE__->add_unique_constraint("message_name", ["message_name"]);
82 =head1 RELATIONS
84 =head2 borrower_message_preferences
86 Type: has_many
88 Related object: L<Koha::Schema::Result::BorrowerMessagePreference>
90 =cut
92 __PACKAGE__->has_many(
93 "borrower_message_preferences",
94 "Koha::Schema::Result::BorrowerMessagePreference",
95 { "foreign.message_attribute_id" => "self.message_attribute_id" },
96 { cascade_copy => 0, cascade_delete => 0 },
99 =head2 message_transports
101 Type: has_many
103 Related object: L<Koha::Schema::Result::MessageTransport>
105 =cut
107 __PACKAGE__->has_many(
108 "message_transports",
109 "Koha::Schema::Result::MessageTransport",
110 { "foreign.message_attribute_id" => "self.message_attribute_id" },
111 { cascade_copy => 0, cascade_delete => 0 },
115 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
116 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:N033AvWwG2CDBDuTj2unqQ
119 # You can replace this text with custom content, and it will be preserved on regeneration