Bug 8798: DBIx::Class base classes for all Koha tables
[koha.git] / Koha / Schema / Result / CreatorBatch.pm
1 package Koha::Schema::Result::CreatorBatch;
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::CreatorBatch
15
16 =cut
17
18 __PACKAGE__->table("creator_batches");
19
20 =head1 ACCESSORS
21
22 =head2 label_id
23
24   data_type: 'integer'
25   is_auto_increment: 1
26   is_nullable: 0
27
28 =head2 batch_id
29
30   data_type: 'integer'
31   default_value: 1
32   is_nullable: 0
33
34 =head2 item_number
35
36   data_type: 'integer'
37   is_foreign_key: 1
38   is_nullable: 1
39
40 =head2 borrower_number
41
42   data_type: 'integer'
43   is_foreign_key: 1
44   is_nullable: 1
45
46 =head2 timestamp
47
48   data_type: 'timestamp'
49   default_value: current_timestamp
50   is_nullable: 0
51
52 =head2 branch_code
53
54   data_type: 'varchar'
55   default_value: 'NB'
56   is_foreign_key: 1
57   is_nullable: 0
58   size: 10
59
60 =head2 creator
61
62   data_type: 'char'
63   default_value: 'Labels'
64   is_nullable: 0
65   size: 15
66
67 =cut
68
69 __PACKAGE__->add_columns(
70   "label_id",
71   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
72   "batch_id",
73   { data_type => "integer", default_value => 1, is_nullable => 0 },
74   "item_number",
75   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
76   "borrower_number",
77   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
78   "timestamp",
79   {
80     data_type     => "timestamp",
81     default_value => \"current_timestamp",
82     is_nullable   => 0,
83   },
84   "branch_code",
85   {
86     data_type => "varchar",
87     default_value => "NB",
88     is_foreign_key => 1,
89     is_nullable => 0,
90     size => 10,
91   },
92   "creator",
93   {
94     data_type => "char",
95     default_value => "Labels",
96     is_nullable => 0,
97     size => 15,
98   },
99 );
100 __PACKAGE__->set_primary_key("label_id");
101
102 =head1 RELATIONS
103
104 =head2 borrower_number
105
106 Type: belongs_to
107
108 Related object: L<Koha::Schema::Result::Borrower>
109
110 =cut
111
112 __PACKAGE__->belongs_to(
113   "borrower_number",
114   "Koha::Schema::Result::Borrower",
115   { borrowernumber => "borrower_number" },
116   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
117 );
118
119 =head2 branch_code
120
121 Type: belongs_to
122
123 Related object: L<Koha::Schema::Result::Branch>
124
125 =cut
126
127 __PACKAGE__->belongs_to(
128   "branch_code",
129   "Koha::Schema::Result::Branch",
130   { branchcode => "branch_code" },
131   { on_delete => "CASCADE", on_update => "CASCADE" },
132 );
133
134 =head2 item_number
135
136 Type: belongs_to
137
138 Related object: L<Koha::Schema::Result::Item>
139
140 =cut
141
142 __PACKAGE__->belongs_to(
143   "item_number",
144   "Koha::Schema::Result::Item",
145   { itemnumber => "item_number" },
146   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
147 );
148
149
150 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
151 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ei9dbdCUspCrRrhIBHQG6w
152
153
154 # You can replace this text with custom content, and it will be preserved on regeneration
155 1;