Bug 20434: Update UNIMARC framework - auth (SAUTTIT)
[koha.git] / Koha / Schema / Result / CreatorBatch.pm
blob7f6f07faadbcdfa04cc8a5142813ba899394e25e
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 description
40 data_type: 'mediumtext'
41 is_nullable: 1
43 =head2 item_number
45 data_type: 'integer'
46 is_foreign_key: 1
47 is_nullable: 1
49 =head2 borrower_number
51 data_type: 'integer'
52 is_foreign_key: 1
53 is_nullable: 1
55 =head2 timestamp
57 data_type: 'timestamp'
58 datetime_undef_if_invalid: 1
59 default_value: current_timestamp
60 is_nullable: 0
62 =head2 branch_code
64 data_type: 'varchar'
65 default_value: 'NB'
66 is_foreign_key: 1
67 is_nullable: 0
68 size: 10
70 =head2 creator
72 data_type: 'char'
73 default_value: 'Labels'
74 is_nullable: 0
75 size: 15
77 =cut
79 __PACKAGE__->add_columns(
80 "label_id",
81 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
82 "batch_id",
83 { data_type => "integer", default_value => 1, is_nullable => 0 },
84 "description",
85 { data_type => "mediumtext", is_nullable => 1 },
86 "item_number",
87 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
88 "borrower_number",
89 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
90 "timestamp",
92 data_type => "timestamp",
93 datetime_undef_if_invalid => 1,
94 default_value => \"current_timestamp",
95 is_nullable => 0,
97 "branch_code",
99 data_type => "varchar",
100 default_value => "NB",
101 is_foreign_key => 1,
102 is_nullable => 0,
103 size => 10,
105 "creator",
107 data_type => "char",
108 default_value => "Labels",
109 is_nullable => 0,
110 size => 15,
114 =head1 PRIMARY KEY
116 =over 4
118 =item * L</label_id>
120 =back
122 =cut
124 __PACKAGE__->set_primary_key("label_id");
126 =head1 RELATIONS
128 =head2 borrower_number
130 Type: belongs_to
132 Related object: L<Koha::Schema::Result::Borrower>
134 =cut
136 __PACKAGE__->belongs_to(
137 "borrower_number",
138 "Koha::Schema::Result::Borrower",
139 { borrowernumber => "borrower_number" },
141 is_deferrable => 1,
142 join_type => "LEFT",
143 on_delete => "CASCADE",
144 on_update => "CASCADE",
148 =head2 branch_code
150 Type: belongs_to
152 Related object: L<Koha::Schema::Result::Branch>
154 =cut
156 __PACKAGE__->belongs_to(
157 "branch_code",
158 "Koha::Schema::Result::Branch",
159 { branchcode => "branch_code" },
160 { is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" },
163 =head2 item_number
165 Type: belongs_to
167 Related object: L<Koha::Schema::Result::Item>
169 =cut
171 __PACKAGE__->belongs_to(
172 "item_number",
173 "Koha::Schema::Result::Item",
174 { itemnumber => "item_number" },
176 is_deferrable => 1,
177 join_type => "LEFT",
178 on_delete => "CASCADE",
179 on_update => "RESTRICT",
184 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-24 17:34:29
185 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5SOMkaJ6IxGtnqtPVFpNtg
188 # You can replace this text with custom content, and it will be preserved on regeneration