Bug 16829: DBIx update
[koha.git] / Koha / Schema / Result / Letter.pm
blob04261e27a006c5fffaba4c72efd96d08979132f4
1 use utf8;
2 package Koha::Schema::Result::Letter;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Letter
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<letter>
20 =cut
22 __PACKAGE__->table("letter");
24 =head1 ACCESSORS
26 =head2 module
28 data_type: 'varchar'
29 default_value: (empty string)
30 is_nullable: 0
31 size: 20
33 =head2 code
35 data_type: 'varchar'
36 default_value: (empty string)
37 is_nullable: 0
38 size: 20
40 =head2 branchcode
42 data_type: 'varchar'
43 default_value: (empty string)
44 is_nullable: 0
45 size: 10
47 =head2 name
49 data_type: 'varchar'
50 default_value: (empty string)
51 is_nullable: 0
52 size: 100
54 =head2 is_html
56 data_type: 'tinyint'
57 default_value: 0
58 is_nullable: 1
60 =head2 title
62 data_type: 'varchar'
63 default_value: (empty string)
64 is_nullable: 0
65 size: 200
67 =head2 content
69 data_type: 'text'
70 is_nullable: 1
72 =head2 message_transport_type
74 data_type: 'varchar'
75 default_value: 'email'
76 is_foreign_key: 1
77 is_nullable: 0
78 size: 20
80 =cut
82 __PACKAGE__->add_columns(
83 "module",
84 { data_type => "varchar", default_value => "", is_nullable => 0, size => 20 },
85 "code",
86 { data_type => "varchar", default_value => "", is_nullable => 0, size => 20 },
87 "branchcode",
88 { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
89 "name",
90 { data_type => "varchar", default_value => "", is_nullable => 0, size => 100 },
91 "is_html",
92 { data_type => "tinyint", default_value => 0, is_nullable => 1 },
93 "title",
94 { data_type => "varchar", default_value => "", is_nullable => 0, size => 200 },
95 "content",
96 { data_type => "text", is_nullable => 1 },
97 "message_transport_type",
99 data_type => "varchar",
100 default_value => "email",
101 is_foreign_key => 1,
102 is_nullable => 0,
103 size => 20,
107 =head1 PRIMARY KEY
109 =over 4
111 =item * L</module>
113 =item * L</code>
115 =item * L</branchcode>
117 =item * L</message_transport_type>
119 =back
121 =cut
123 __PACKAGE__->set_primary_key("module", "code", "branchcode", "message_transport_type");
125 =head1 RELATIONS
127 =head2 message_transport_type
129 Type: belongs_to
131 Related object: L<Koha::Schema::Result::MessageTransportType>
133 =cut
135 __PACKAGE__->belongs_to(
136 "message_transport_type",
137 "Koha::Schema::Result::MessageTransportType",
138 { message_transport_type => "message_transport_type" },
139 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
142 =head2 message_transports
144 Type: has_many
146 Related object: L<Koha::Schema::Result::MessageTransport>
148 =cut
150 __PACKAGE__->has_many(
151 "message_transports",
152 "Koha::Schema::Result::MessageTransport",
154 "foreign.branchcode" => "self.branchcode",
155 "foreign.letter_code" => "self.code",
156 "foreign.letter_module" => "self.module",
158 { cascade_copy => 0, cascade_delete => 0 },
162 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2014-05-02 18:04:32
163 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HFUQ+/BKlweHglzOlm0lUQ
166 # You can replace this text with custom content, and it will be preserved on regeneration