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" },
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
151 __PACKAGE__
->add_columns(
152 '+archived' => { is_boolean
=> 1 },
153 '+branch_default' => { is_boolean
=> 1 },
156 # You can replace this text with custom code or comments, and it will be preserved on regeneration