Bug 23805: Update mancredit to use the new credit types
[koha.git] / Koha / Schema / Result / AccountCreditType.pm
1 use utf8;
2 package Koha::Schema::Result::AccountCreditType;
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::AccountCreditType
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<account_credit_types>
19
20 =cut
21
22 __PACKAGE__->table("account_credit_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_added_manually
39
40   data_type: 'tinyint'
41   default_value: 1
42   is_nullable: 0
43
44 =head2 is_system
45
46   data_type: 'tinyint'
47   default_value: 0
48   is_nullable: 0
49
50 =cut
51
52 __PACKAGE__->add_columns(
53   "code",
54   { data_type => "varchar", is_nullable => 0, size => 80 },
55   "description",
56   { data_type => "varchar", is_nullable => 1, size => 200 },
57   "can_be_added_manually",
58   { data_type => "tinyint", default_value => 1, is_nullable => 0 },
59   "is_system",
60   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
61 );
62
63 =head1 PRIMARY KEY
64
65 =over 4
66
67 =item * L</code>
68
69 =back
70
71 =cut
72
73 __PACKAGE__->set_primary_key("code");
74
75 =head1 RELATIONS
76
77 =head2 account_credit_types_branches
78
79 Type: has_many
80
81 Related object: L<Koha::Schema::Result::AccountCreditTypesBranch>
82
83 =cut
84
85 __PACKAGE__->has_many(
86   "account_credit_types_branches",
87   "Koha::Schema::Result::AccountCreditTypesBranch",
88   { "foreign.credit_type_code" => "self.code" },
89   { cascade_copy => 0, cascade_delete => 0 },
90 );
91
92 =head2 accountlines
93
94 Type: has_many
95
96 Related object: L<Koha::Schema::Result::Accountline>
97
98 =cut
99
100 __PACKAGE__->has_many(
101   "accountlines",
102   "Koha::Schema::Result::Accountline",
103   { "foreign.credit_type_code" => "self.code" },
104   { cascade_copy => 0, cascade_delete => 0 },
105 );
106
107
108 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-14 09:59:52
109 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Uycu/23b681kWHNX+/gNiw
110
111 __PACKAGE__->add_columns(
112     '+is_system' => { is_boolean => 1 }
113 );
114
115 sub koha_objects_class {
116     'Koha::Account::CreditTypes';
117 }
118 sub koha_object_class {
119     'Koha::Account::CreditType';
120 }
121
122 1;