Bug 23727: Update Schema
[koha.git] / Koha / Schema / Result / CashRegisterAction.pm
1 use utf8;
2 package Koha::Schema::Result::CashRegisterAction;
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::CashRegisterAction
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<cash_register_actions>
19
20 =cut
21
22 __PACKAGE__->table("cash_register_actions");
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 code
33
34   data_type: 'varchar'
35   is_nullable: 0
36   size: 24
37
38 =head2 register_id
39
40   data_type: 'integer'
41   is_foreign_key: 1
42   is_nullable: 0
43
44 =head2 manager_id
45
46   data_type: 'integer'
47   is_foreign_key: 1
48   is_nullable: 0
49
50 =head2 amount
51
52   data_type: 'decimal'
53   is_nullable: 1
54   size: [28,6]
55
56 =head2 timestamp
57
58   data_type: 'timestamp'
59   datetime_undef_if_invalid: 1
60   default_value: current_timestamp
61   is_nullable: 0
62
63 =cut
64
65 __PACKAGE__->add_columns(
66   "id",
67   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
68   "code",
69   { data_type => "varchar", is_nullable => 0, size => 24 },
70   "register_id",
71   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
72   "manager_id",
73   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
74   "amount",
75   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
76   "timestamp",
77   {
78     data_type => "timestamp",
79     datetime_undef_if_invalid => 1,
80     default_value => \"current_timestamp",
81     is_nullable => 0,
82   },
83 );
84
85 =head1 PRIMARY KEY
86
87 =over 4
88
89 =item * L</id>
90
91 =back
92
93 =cut
94
95 __PACKAGE__->set_primary_key("id");
96
97 =head1 RELATIONS
98
99 =head2 manager
100
101 Type: belongs_to
102
103 Related object: L<Koha::Schema::Result::Borrower>
104
105 =cut
106
107 __PACKAGE__->belongs_to(
108   "manager",
109   "Koha::Schema::Result::Borrower",
110   { borrowernumber => "manager_id" },
111   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
112 );
113
114 =head2 register
115
116 Type: belongs_to
117
118 Related object: L<Koha::Schema::Result::CashRegister>
119
120 =cut
121
122 __PACKAGE__->belongs_to(
123   "register",
124   "Koha::Schema::Result::CashRegister",
125   { id => "register_id" },
126   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
127 );
128
129
130 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-07-23 13:21:03
131 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Oaee+hS82IEJHHBGuOXDtw
132
133 sub koha_objects_class {
134     'Koha::Cash::Register::Actions';
135 }
136
137 sub koha_object_class {
138     'Koha::Cash::Register::Action';
139 }
140
141 1;