Bug 4461: dbic schema update
[koha.git] / Koha / Schema / Result / AccountCreditType.pm
blob4ee8e86b3c015608d1598a3adf137282694eea6c
1 use utf8;
2 package Koha::Schema::Result::AccountCreditType;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::AccountCreditType
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<account_credit_types>
20 =cut
22 __PACKAGE__->table("account_credit_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_added_manually
40 data_type: 'tinyint'
41 default_value: 1
42 is_nullable: 0
44 =head2 is_system
46 data_type: 'tinyint'
47 default_value: 0
48 is_nullable: 0
50 =head2 archived
52 data_type: 'tinyint'
53 default_value: 0
54 is_nullable: 0
56 =cut
58 __PACKAGE__->add_columns(
59 "code",
60 { data_type => "varchar", is_nullable => 0, size => 80 },
61 "description",
62 { data_type => "varchar", is_nullable => 1, size => 200 },
63 "can_be_added_manually",
64 { data_type => "tinyint", default_value => 1, is_nullable => 0 },
65 "is_system",
66 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
67 "archived",
68 { data_type => "tinyint", default_value => 0, is_nullable => 0 },
71 =head1 PRIMARY KEY
73 =over 4
75 =item * L</code>
77 =back
79 =cut
81 __PACKAGE__->set_primary_key("code");
83 =head1 RELATIONS
85 =head2 account_credit_types_branches
87 Type: has_many
89 Related object: L<Koha::Schema::Result::AccountCreditTypesBranch>
91 =cut
93 __PACKAGE__->has_many(
94 "account_credit_types_branches",
95 "Koha::Schema::Result::AccountCreditTypesBranch",
96 { "foreign.credit_type_code" => "self.code" },
97 { cascade_copy => 0, cascade_delete => 0 },
100 =head2 accountlines
102 Type: has_many
104 Related object: L<Koha::Schema::Result::Accountline>
106 =cut
108 __PACKAGE__->has_many(
109 "accountlines",
110 "Koha::Schema::Result::Accountline",
111 { "foreign.credit_type_code" => "self.code" },
112 { cascade_copy => 0, cascade_delete => 0 },
116 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-20 14:48:55
117 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hdxcXxCqIDxwfSHjSr0VUg
119 __PACKAGE__->add_columns(
120 '+is_system' => { is_boolean => 1 }
123 sub koha_objects_class {
124 'Koha::Account::CreditTypes';
126 sub koha_object_class {
127 'Koha::Account::CreditType';