Bug 25501: Supress warnings on installing translation
[koha.git] / Koha / Schema / Result / OpacNews.pm
blobc3906da8243f00919f4a7256db3edfe5e4eac3e1
1 use utf8;
2 package Koha::Schema::Result::OpacNews;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::OpacNews
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<opac_news>
20 =cut
22 __PACKAGE__->table("opac_news");
24 =head1 ACCESSORS
26 =head2 idnew
28 data_type: 'integer'
29 extra: {unsigned => 1}
30 is_auto_increment: 1
31 is_nullable: 0
33 =head2 branchcode
35 data_type: 'varchar'
36 is_foreign_key: 1
37 is_nullable: 1
38 size: 10
40 =head2 title
42 data_type: 'varchar'
43 default_value: (empty string)
44 is_nullable: 0
45 size: 250
47 =head2 content
49 data_type: 'mediumtext'
50 is_nullable: 0
52 =head2 lang
54 data_type: 'varchar'
55 default_value: (empty string)
56 is_nullable: 0
57 size: 25
59 =head2 timestamp
61 data_type: 'timestamp'
62 datetime_undef_if_invalid: 1
63 default_value: current_timestamp
64 is_nullable: 0
66 =head2 expirationdate
68 data_type: 'date'
69 datetime_undef_if_invalid: 1
70 is_nullable: 1
72 =head2 number
74 data_type: 'integer'
75 is_nullable: 1
77 =head2 borrowernumber
79 data_type: 'integer'
80 is_foreign_key: 1
81 is_nullable: 1
83 =cut
85 __PACKAGE__->add_columns(
86 "idnew",
88 data_type => "integer",
89 extra => { unsigned => 1 },
90 is_auto_increment => 1,
91 is_nullable => 0,
93 "branchcode",
94 { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
95 "title",
96 { data_type => "varchar", default_value => "", is_nullable => 0, size => 250 },
97 "content",
98 { data_type => "mediumtext", is_nullable => 0 },
99 "lang",
100 { data_type => "varchar", default_value => "", is_nullable => 0, size => 25 },
101 "timestamp",
103 data_type => "timestamp",
104 datetime_undef_if_invalid => 1,
105 default_value => \"current_timestamp",
106 is_nullable => 0,
108 "expirationdate",
109 { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
110 "number",
111 { data_type => "integer", is_nullable => 1 },
112 "borrowernumber",
113 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
116 =head1 PRIMARY KEY
118 =over 4
120 =item * L</idnew>
122 =back
124 =cut
126 __PACKAGE__->set_primary_key("idnew");
128 =head1 RELATIONS
130 =head2 borrowernumber
132 Type: belongs_to
134 Related object: L<Koha::Schema::Result::Borrower>
136 =cut
138 __PACKAGE__->belongs_to(
139 "borrowernumber",
140 "Koha::Schema::Result::Borrower",
141 { borrowernumber => "borrowernumber" },
143 is_deferrable => 1,
144 join_type => "LEFT",
145 on_delete => "SET NULL",
146 on_update => "CASCADE",
150 =head2 branchcode
152 Type: belongs_to
154 Related object: L<Koha::Schema::Result::Branch>
156 =cut
158 __PACKAGE__->belongs_to(
159 "branchcode",
160 "Koha::Schema::Result::Branch",
161 { branchcode => "branchcode" },
163 is_deferrable => 1,
164 join_type => "LEFT",
165 on_delete => "CASCADE",
166 on_update => "CASCADE",
171 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54
172 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gApTRM/dF6uZSMYyvkt4OQ
174 sub koha_object_class {
175 'Koha::NewsItem';
177 sub koha_objects_class {
178 'Koha::News';