Line 0
Link Here
|
0 |
- |
1 |
use utf8; |
|
|
2 |
package Koha::Schema::Result::CashRegister; |
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::CashRegister |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<cash_registers> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("cash_registers"); |
23 |
|
24 |
=head1 ACCESSORS |
25 |
|
26 |
=head2 id |
27 |
|
28 |
data_type: 'integer' |
29 |
is_auto_increment: 1 |
30 |
is_nullable: 0 |
31 |
|
32 |
=head2 name |
33 |
|
34 |
data_type: 'varchar' |
35 |
is_nullable: 0 |
36 |
size: 24 |
37 |
|
38 |
=head2 description |
39 |
|
40 |
data_type: 'longtext' |
41 |
is_nullable: 0 |
42 |
|
43 |
=head2 branch |
44 |
|
45 |
data_type: 'varchar' |
46 |
is_foreign_key: 1 |
47 |
is_nullable: 0 |
48 |
size: 10 |
49 |
|
50 |
=head2 branch_default |
51 |
|
52 |
data_type: 'tinyint' |
53 |
default_value: 0 |
54 |
is_nullable: 0 |
55 |
|
56 |
=head2 starting_float |
57 |
|
58 |
data_type: 'decimal' |
59 |
is_nullable: 1 |
60 |
size: [28,6] |
61 |
|
62 |
=head2 archived |
63 |
|
64 |
data_type: 'tinyint' |
65 |
default_value: 0 |
66 |
is_nullable: 0 |
67 |
|
68 |
=cut |
69 |
|
70 |
__PACKAGE__->add_columns( |
71 |
"id", |
72 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
73 |
"name", |
74 |
{ data_type => "varchar", is_nullable => 0, size => 24 }, |
75 |
"description", |
76 |
{ data_type => "longtext", is_nullable => 0 }, |
77 |
"branch", |
78 |
{ data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, |
79 |
"branch_default", |
80 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
81 |
"starting_float", |
82 |
{ data_type => "decimal", is_nullable => 1, size => [28, 6] }, |
83 |
"archived", |
84 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
85 |
); |
86 |
|
87 |
=head1 PRIMARY KEY |
88 |
|
89 |
=over 4 |
90 |
|
91 |
=item * L</id> |
92 |
|
93 |
=back |
94 |
|
95 |
=cut |
96 |
|
97 |
__PACKAGE__->set_primary_key("id"); |
98 |
|
99 |
=head1 UNIQUE CONSTRAINTS |
100 |
|
101 |
=head2 C<name> |
102 |
|
103 |
=over 4 |
104 |
|
105 |
=item * L</name> |
106 |
|
107 |
=item * L</branch> |
108 |
|
109 |
=back |
110 |
|
111 |
=cut |
112 |
|
113 |
__PACKAGE__->add_unique_constraint("name", ["name", "branch"]); |
114 |
|
115 |
=head1 RELATIONS |
116 |
|
117 |
=head2 accountlines |
118 |
|
119 |
Type: has_many |
120 |
|
121 |
Related object: L<Koha::Schema::Result::Accountline> |
122 |
|
123 |
=cut |
124 |
|
125 |
__PACKAGE__->has_many( |
126 |
"accountlines", |
127 |
"Koha::Schema::Result::Accountline", |
128 |
{ "foreign.register_id" => "self.id" }, |
129 |
{ cascade_copy => 0, cascade_delete => 0 }, |
130 |
); |
131 |
|
132 |
=head2 branch |
133 |
|
134 |
Type: belongs_to |
135 |
|
136 |
Related object: L<Koha::Schema::Result::Branch> |
137 |
|
138 |
=cut |
139 |
|
140 |
__PACKAGE__->belongs_to( |
141 |
"branch", |
142 |
"Koha::Schema::Result::Branch", |
143 |
{ branchcode => "branch" }, |
144 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
145 |
); |
146 |
|
147 |
|
148 |
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-07-23 13:14:31 |
149 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TfGf0U/vWS7IviRlvDdE1w |
150 |
|
151 |
|
152 |
# You can replace this text with custom code or comments, and it will be preserved on regeneration |
153 |
1; |