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");
70 __PACKAGE__->add_columns(
72 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
74 { data_type => "varchar", is_nullable => 0, size => 24 },
76 { data_type => "longtext", is_nullable => 0 },
78 { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
80 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
82 { data_type => "decimal", is_nullable => 1, size => [28, 6] },
84 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
97 __PACKAGE__->set_primary_key("id");
99 =head1 UNIQUE CONSTRAINTS
113 __PACKAGE__->add_unique_constraint("name", ["name", "branch"]);
121 Related object: L<Koha::Schema::Result::Accountline>
125 __PACKAGE__->has_many(
127 "Koha::Schema::Result::Accountline",
128 { "foreign.register_id" => "self.id" },
129 { cascade_copy => 0, cascade_delete => 0 },
136 Related object: L<Koha::Schema::Result::Branch>
140 __PACKAGE__->belongs_to(
142 "Koha::Schema::Result::Branch",
143 { branchcode => "branch" },
144 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
147 =head2 cash_register_actions
151 Related object: L<Koha::Schema::Result::CashRegisterAction>
155 __PACKAGE__->has_many(
156 "cash_register_actions",
157 "Koha::Schema::Result::CashRegisterAction",
158 { "foreign.register_id" => "self.id" },
159 { cascade_copy => 0, cascade_delete => 0 },
163 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-07-23 13:21:03
164 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zP8my0Zp5bSARTBfws4n1A
166 __PACKAGE__->add_columns(
167 '+archived' => { is_boolean => 1 },
168 '+branch_default' => { is_boolean => 1 },
171 sub koha_objects_class {
172 'Koha::Cash::Registers';
175 sub koha_object_class {
176 'Koha::Cash::Register';
179 # You can replace this text with custom code or comments, and it will be preserved on regeneration