Bug 8686: Raise required version of URI::Escape to 3.31
[koha.git] / Koha / Schema / Result / CreatorBatch.pm
blob7049950b46241f3f801e29f2656ea5a9738afcac
1 use utf8;
2 package Koha::Schema::Result::CreatorBatch;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::CreatorBatch
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<creator_batches>
20 =cut
22 __PACKAGE__->table("creator_batches");
24 =head1 ACCESSORS
26 =head2 label_id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 batch_id
34 data_type: 'integer'
35 default_value: 1
36 is_nullable: 0
38 =head2 item_number
40 data_type: 'integer'
41 is_foreign_key: 1
42 is_nullable: 1
44 =head2 borrower_number
46 data_type: 'integer'
47 is_foreign_key: 1
48 is_nullable: 1
50 =head2 timestamp
52 data_type: 'timestamp'
53 datetime_undef_if_invalid: 1
54 default_value: current_timestamp
55 is_nullable: 0
57 =head2 branch_code
59 data_type: 'varchar'
60 default_value: 'NB'
61 is_foreign_key: 1
62 is_nullable: 0
63 size: 10
65 =head2 creator
67 data_type: 'char'
68 default_value: 'Labels'
69 is_nullable: 0
70 size: 15
72 =cut
74 __PACKAGE__->add_columns(
75 "label_id",
76 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
77 "batch_id",
78 { data_type => "integer", default_value => 1, is_nullable => 0 },
79 "item_number",
80 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
81 "borrower_number",
82 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
83 "timestamp",
85 data_type => "timestamp",
86 datetime_undef_if_invalid => 1,
87 default_value => \"current_timestamp",
88 is_nullable => 0,
90 "branch_code",
92 data_type => "varchar",
93 default_value => "NB",
94 is_foreign_key => 1,
95 is_nullable => 0,
96 size => 10,
98 "creator",
100 data_type => "char",
101 default_value => "Labels",
102 is_nullable => 0,
103 size => 15,
107 =head1 PRIMARY KEY
109 =over 4
111 =item * L</label_id>
113 =back
115 =cut
117 __PACKAGE__->set_primary_key("label_id");
119 =head1 RELATIONS
121 =head2 borrower_number
123 Type: belongs_to
125 Related object: L<Koha::Schema::Result::Borrower>
127 =cut
129 __PACKAGE__->belongs_to(
130 "borrower_number",
131 "Koha::Schema::Result::Borrower",
132 { borrowernumber => "borrower_number" },
134 is_deferrable => 1,
135 join_type => "LEFT",
136 on_delete => "CASCADE",
137 on_update => "CASCADE",
141 =head2 branch_code
143 Type: belongs_to
145 Related object: L<Koha::Schema::Result::Branch>
147 =cut
149 __PACKAGE__->belongs_to(
150 "branch_code",
151 "Koha::Schema::Result::Branch",
152 { branchcode => "branch_code" },
153 { is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" },
156 =head2 item_number
158 Type: belongs_to
160 Related object: L<Koha::Schema::Result::Item>
162 =cut
164 __PACKAGE__->belongs_to(
165 "item_number",
166 "Koha::Schema::Result::Item",
167 { itemnumber => "item_number" },
169 is_deferrable => 1,
170 join_type => "LEFT",
171 on_delete => "CASCADE",
172 on_update => "RESTRICT",
177 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-11 09:26:55
178 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:x9PaYKzfg8jT6zFP4IwhBA
181 # You can replace this text with custom content, and it will be preserved on regeneration