Bug 8798: DBIx::Class base classes for all Koha tables
[koha.git] / Koha / Schema / Result / Letter.pm
1 package Koha::Schema::Result::Letter;
2
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6 use strict;
7 use warnings;
8
9 use base 'DBIx::Class::Core';
10
11
12 =head1 NAME
13
14 Koha::Schema::Result::Letter
15
16 =cut
17
18 __PACKAGE__->table("letter");
19
20 =head1 ACCESSORS
21
22 =head2 module
23
24   data_type: 'varchar'
25   default_value: (empty string)
26   is_nullable: 0
27   size: 20
28
29 =head2 code
30
31   data_type: 'varchar'
32   default_value: (empty string)
33   is_nullable: 0
34   size: 20
35
36 =head2 branchcode
37
38   data_type: 'varchar'
39   default_value: (empty string)
40   is_nullable: 0
41   size: 10
42
43 =head2 name
44
45   data_type: 'varchar'
46   default_value: (empty string)
47   is_nullable: 0
48   size: 100
49
50 =head2 is_html
51
52   data_type: 'tinyint'
53   default_value: 0
54   is_nullable: 1
55
56 =head2 title
57
58   data_type: 'varchar'
59   default_value: (empty string)
60   is_nullable: 0
61   size: 200
62
63 =head2 content
64
65   data_type: 'text'
66   is_nullable: 1
67
68 =cut
69
70 __PACKAGE__->add_columns(
71   "module",
72   { data_type => "varchar", default_value => "", is_nullable => 0, size => 20 },
73   "code",
74   { data_type => "varchar", default_value => "", is_nullable => 0, size => 20 },
75   "branchcode",
76   { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
77   "name",
78   { data_type => "varchar", default_value => "", is_nullable => 0, size => 100 },
79   "is_html",
80   { data_type => "tinyint", default_value => 0, is_nullable => 1 },
81   "title",
82   { data_type => "varchar", default_value => "", is_nullable => 0, size => 200 },
83   "content",
84   { data_type => "text", is_nullable => 1 },
85 );
86 __PACKAGE__->set_primary_key("module", "code", "branchcode");
87
88 =head1 RELATIONS
89
90 =head2 message_transports
91
92 Type: has_many
93
94 Related object: L<Koha::Schema::Result::MessageTransport>
95
96 =cut
97
98 __PACKAGE__->has_many(
99   "message_transports",
100   "Koha::Schema::Result::MessageTransport",
101   {
102     "foreign.branchcode"    => "self.branchcode",
103     "foreign.letter_code"   => "self.code",
104     "foreign.letter_module" => "self.module",
105   },
106   { cascade_copy => 0, cascade_delete => 0 },
107 );
108
109
110 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
111 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MDVfBFxikRa6QrFHs549ZA
112
113
114 # You can replace this text with custom content, and it will be preserved on regeneration
115 1;