Bug 30755: Remove auto_too_soon from error count
[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 unique identifier for each account register action
33
34 =head2 code
35
36   data_type: 'varchar'
37   is_nullable: 0
38   size: 24
39
40 action code denoting the type of action recorded (enum),
41
42 =head2 register_id
43
44   data_type: 'integer'
45   is_foreign_key: 1
46   is_nullable: 0
47
48 id of cash_register this action belongs to,
49
50 =head2 manager_id
51
52   data_type: 'integer'
53   is_foreign_key: 1
54   is_nullable: 0
55
56 staff member performing the action
57
58 =head2 amount
59
60   data_type: 'decimal'
61   is_nullable: 1
62   size: [28,6]
63
64 amount recorded in action (signed)
65
66 =head2 timestamp
67
68   data_type: 'timestamp'
69   datetime_undef_if_invalid: 1
70   default_value: current_timestamp
71   is_nullable: 0
72
73 =cut
74
75 __PACKAGE__->add_columns(
76   "id",
77   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
78   "code",
79   { data_type => "varchar", is_nullable => 0, size => 24 },
80   "register_id",
81   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
82   "manager_id",
83   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
84   "amount",
85   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
86   "timestamp",
87   {
88     data_type => "timestamp",
89     datetime_undef_if_invalid => 1,
90     default_value => \"current_timestamp",
91     is_nullable => 0,
92   },
93 );
94
95 =head1 PRIMARY KEY
96
97 =over 4
98
99 =item * L</id>
100
101 =back
102
103 =cut
104
105 __PACKAGE__->set_primary_key("id");
106
107 =head1 RELATIONS
108
109 =head2 manager
110
111 Type: belongs_to
112
113 Related object: L<Koha::Schema::Result::Borrower>
114
115 =cut
116
117 __PACKAGE__->belongs_to(
118   "manager",
119   "Koha::Schema::Result::Borrower",
120   { borrowernumber => "manager_id" },
121   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
122 );
123
124 =head2 register
125
126 Type: belongs_to
127
128 Related object: L<Koha::Schema::Result::CashRegister>
129
130 =cut
131
132 __PACKAGE__->belongs_to(
133   "register",
134   "Koha::Schema::Result::CashRegister",
135   { id => "register_id" },
136   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
137 );
138
139
140 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
141 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Fo6979mQEueJrDQw38Bh0w
142
143 sub koha_objects_class {
144     'Koha::Cash::Register::Actions';
145 }
146
147 sub koha_object_class {
148     'Koha::Cash::Register::Action';
149 }
150
151 1;