2 package Koha::Schema::Result::CashRegister;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::CashRegister
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<cash_registers>
22 __PACKAGE__->table("cash_registers");
32 unique identifier for each account register
40 the user friendly identifier for each account register
47 the user friendly description for each account register
56 the foreign key the library this account register belongs
64 boolean flag to denote that this till is the branch default
72 the starting float this account register should be assigned
80 boolean flag to denote if this till is archived or not
84 __PACKAGE__->add_columns(
86 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
88 { data_type => "varchar", is_nullable => 0, size => 24 },
90 { data_type => "longtext", is_nullable => 0 },
92 { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
94 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
96 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
98 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
111 __PACKAGE__->set_primary_key("id");
113 =head1 UNIQUE CONSTRAINTS
127 __PACKAGE__->add_unique_constraint("name", ["name", "branch"]);
135 Related object: L<Koha::Schema::Result::Accountline>
139 __PACKAGE__->has_many(
141 "Koha::Schema::Result::Accountline",
142 { "foreign.register_id" => "self.id" },
143 { cascade_copy => 0, cascade_delete => 0 },
150 Related object: L<Koha::Schema::Result::Branch>
154 __PACKAGE__->belongs_to(
156 "Koha::Schema::Result::Branch",
157 { branchcode => "branch" },
158 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
161 =head2 cash_register_actions
165 Related object: L<Koha::Schema::Result::CashRegisterAction>
169 __PACKAGE__->has_many(
170 "cash_register_actions",
171 "Koha::Schema::Result::CashRegisterAction",
172 { "foreign.register_id" => "self.id" },
173 { cascade_copy => 0, cascade_delete => 0 },
177 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
178 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NNSzc20vEH34dmEsTb5K0Q
180 __PACKAGE__->add_columns(
181 '+archived' => { is_boolean => 1 },
182 '+branch_default' => { is_boolean => 1 },
185 sub koha_objects_class {
186 'Koha::Cash::Registers';
189 sub koha_object_class {
190 'Koha::Cash::Register';
193 # You can replace this text with custom code or comments, and it will be preserved on regeneration