Bug 21395: Fix creation of PO file
[koha.git] / Koha / Schema / Result / AccountDebitType.pm
blob8772813c2e56e8c828a207e6a90718206fe610db
1 use utf8;
2 package Koha::Schema::Result::AccountDebitType;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::AccountDebitType
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<account_debit_types>
20 =cut
22 __PACKAGE__->table("account_debit_types");
24 =head1 ACCESSORS
26 =head2 code
28 data_type: 'varchar'
29 is_nullable: 0
30 size: 80
32 =head2 description
34 data_type: 'varchar'
35 is_nullable: 1
36 size: 200
38 =head2 can_be_invoiced
40 data_type: 'tinyint'
41 default_value: 1
42 is_nullable: 0
44 =head2 can_be_sold
46 data_type: 'tinyint'
47 default_value: 0
48 is_nullable: 0
50 =head2 default_amount
52 data_type: 'decimal'
53 is_nullable: 1
54 size: [28,6]
56 =head2 is_system
58 data_type: 'tinyint'
59 default_value: 0
60 is_nullable: 0
62 =head2 archived
64 data_type: 'tinyint'
65 default_value: 0
66 is_nullable: 0
68 =cut
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 },
87 =head1 PRIMARY KEY
89 =over 4
91 =item * L</code>
93 =back
95 =cut
97 __PACKAGE__->set_primary_key("code");
99 =head1 RELATIONS
101 =head2 account_debit_types_branches
103 Type: has_many
105 Related object: L<Koha::Schema::Result::AccountDebitTypesBranch>
107 =cut
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 },
116 =head2 accountlines
118 Type: has_many
120 Related object: L<Koha::Schema::Result::Accountline>
122 =cut
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 },
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
135 __PACKAGE__->add_columns(
136 '+is_system' => { is_boolean => 1 }
139 __PACKAGE__->add_columns(
140 "+can_be_sold" => { is_boolean => 1 }
143 __PACKAGE__->add_columns(
144 "+can_be_invoiced" => { is_boolean => 1 }
147 sub koha_objects_class {
148 'Koha::Account::DebitTypes';
150 sub koha_object_class {
151 'Koha::Account::DebitType';
154 # You can replace this text with custom code or comments, and it will be preserved on regeneration