Bug 13242: Add a UT to t/DateUtils.t for testing DateTime bug
[koha.git] / Koha / Schema / Result / OpacNews.pm
1 use utf8;
2 package Koha::Schema::Result::OpacNews;
3
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7 =head1 NAME
8
9 Koha::Schema::Result::OpacNews
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<opac_news>
19
20 =cut
21
22 __PACKAGE__->table("opac_news");
23
24 =head1 ACCESSORS
25
26 =head2 idnew
27
28   data_type: 'integer'
29   extra: {unsigned => 1}
30   is_auto_increment: 1
31   is_nullable: 0
32
33 =head2 branchcode
34
35   data_type: 'varchar'
36   is_foreign_key: 1
37   is_nullable: 1
38   size: 10
39
40 =head2 title
41
42   data_type: 'varchar'
43   default_value: (empty string)
44   is_nullable: 0
45   size: 250
46
47 =head2 new
48
49   accessor: undef
50   data_type: 'text'
51   is_nullable: 0
52
53 =head2 lang
54
55   data_type: 'varchar'
56   default_value: (empty string)
57   is_nullable: 0
58   size: 25
59
60 =head2 timestamp
61
62   data_type: 'timestamp'
63   datetime_undef_if_invalid: 1
64   default_value: current_timestamp
65   is_nullable: 0
66
67 =head2 expirationdate
68
69   data_type: 'date'
70   datetime_undef_if_invalid: 1
71   is_nullable: 1
72
73 =head2 number
74
75   data_type: 'integer'
76   is_nullable: 1
77
78 =cut
79
80 __PACKAGE__->add_columns(
81   "idnew",
82   {
83     data_type => "integer",
84     extra => { unsigned => 1 },
85     is_auto_increment => 1,
86     is_nullable => 0,
87   },
88   "branchcode",
89   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
90   "title",
91   { data_type => "varchar", default_value => "", is_nullable => 0, size => 250 },
92   "new",
93   { accessor => undef, data_type => "text", is_nullable => 0 },
94   "lang",
95   { data_type => "varchar", default_value => "", is_nullable => 0, size => 25 },
96   "timestamp",
97   {
98     data_type => "timestamp",
99     datetime_undef_if_invalid => 1,
100     default_value => \"current_timestamp",
101     is_nullable => 0,
102   },
103   "expirationdate",
104   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
105   "number",
106   { data_type => "integer", is_nullable => 1 },
107 );
108
109 =head1 PRIMARY KEY
110
111 =over 4
112
113 =item * L</idnew>
114
115 =back
116
117 =cut
118
119 __PACKAGE__->set_primary_key("idnew");
120
121 =head1 RELATIONS
122
123 =head2 branchcode
124
125 Type: belongs_to
126
127 Related object: L<Koha::Schema::Result::Branch>
128
129 =cut
130
131 __PACKAGE__->belongs_to(
132   "branchcode",
133   "Koha::Schema::Result::Branch",
134   { branchcode => "branchcode" },
135   {
136     is_deferrable => 1,
137     join_type     => "LEFT",
138     on_delete     => "CASCADE",
139     on_update     => "CASCADE",
140   },
141 );
142
143
144 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2014-02-16 23:15:22
145 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/q+riAqsYmCQkUCUL9MU7g
146
147
148 # You can replace this text with custom content, and it will be preserved on regeneration
149 1;