5a858d82562c09dc89032b0995a17f73f3dec2e7
[koha-equinox.git] / Koha / Schema / Result / AccountDebitType.pm
1 use utf8;
2 package Koha::Schema::Result::AccountDebitType;
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::AccountDebitType
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<account_debit_types>
19
20 =cut
21
22 __PACKAGE__->table("account_debit_types");
23
24 =head1 ACCESSORS
25
26 =head2 code
27
28   data_type: 'varchar'
29   is_nullable: 0
30   size: 80
31
32 =head2 description
33
34   data_type: 'varchar'
35   is_nullable: 1
36   size: 200
37
38 =head2 can_be_invoiced
39
40   data_type: 'tinyint'
41   default_value: 1
42   is_nullable: 0
43
44 =head2 can_be_sold
45
46   data_type: 'tinyint'
47   default_value: 0
48   is_nullable: 0
49
50 =head2 default_amount
51
52   data_type: 'decimal'
53   is_nullable: 1
54   size: [28,6]
55
56 =head2 is_system
57
58   data_type: 'tinyint'
59   default_value: 0
60   is_nullable: 0
61
62 =head2 archived
63
64   data_type: 'tinyint'
65   default_value: 0
66   is_nullable: 0
67
68 =cut
69
70 __PACKAGE__->add_columns(
71   "code",
72   { data_type => "varchar", is_nullable => 0, size => 80 },
73   "description",
74   { data_type => "varchar", is_nullable => 1, size => 200 },
75   "can_be_invoiced",
76   { data_type => "tinyint", default_value => 1, is_nullable => 0 },
77   "can_be_sold",
78   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
79   "default_amount",
80   { data_type => "decimal", is_nullable => 1, size => [28, 6] },
81   "is_system",
82   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
83   "archived",
84   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
85 );
86
87 =head1 PRIMARY KEY
88
89 =over 4
90
91 =item * L</code>
92
93 =back
94
95 =cut
96
97 __PACKAGE__->set_primary_key("code");
98
99 =head1 RELATIONS
100
101 =head2 account_debit_types_branches
102
103 Type: has_many
104
105 Related object: L<Koha::Schema::Result::AccountDebitTypesBranch>
106
107 =cut
108
109 __PACKAGE__->has_many(
110   "account_debit_types_branches",
111   "Koha::Schema::Result::AccountDebitTypesBranch",
112   { "foreign.debit_type_code" => "self.code" },
113   { cascade_copy => 0, cascade_delete => 0 },
114 );
115
116 =head2 accountlines
117
118 Type: has_many
119
120 Related object: L<Koha::Schema::Result::Accountline>
121
122 =cut
123
124 __PACKAGE__->has_many(
125   "accountlines",
126   "Koha::Schema::Result::Accountline",
127   { "foreign.debit_type_code" => "self.code" },
128   { cascade_copy => 0, cascade_delete => 0 },
129 );
130
131
132 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-17 12:22:04
133 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8FIMJZ+JAmqa+Dx7oymBjw
134
135 __PACKAGE__->add_columns(
136     '+is_system' => { is_boolean => 1 }
137 );
138
139 sub koha_objects_class {
140     'Koha::Account::DebitTypes';
141 }
142 sub koha_object_class {
143     'Koha::Account::DebitType';
144 }
145
146 # You can replace this text with custom code or comments, and it will be preserved on regeneration
147 1;