Bug 8798: DBIx::Class base classes for all Koha tables
[koha.git] / Koha / Schema / Result / BorrowerAttributeType.pm
1 package Koha::Schema::Result::BorrowerAttributeType;
2
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6 use strict;
7 use warnings;
8
9 use base 'DBIx::Class::Core';
10
11
12 =head1 NAME
13
14 Koha::Schema::Result::BorrowerAttributeType
15
16 =cut
17
18 __PACKAGE__->table("borrower_attribute_types");
19
20 =head1 ACCESSORS
21
22 =head2 code
23
24   data_type: 'varchar'
25   is_nullable: 0
26   size: 10
27
28 =head2 description
29
30   data_type: 'varchar'
31   is_nullable: 0
32   size: 255
33
34 =head2 repeatable
35
36   data_type: 'tinyint'
37   default_value: 0
38   is_nullable: 0
39
40 =head2 unique_id
41
42   data_type: 'tinyint'
43   default_value: 0
44   is_nullable: 0
45
46 =head2 opac_display
47
48   data_type: 'tinyint'
49   default_value: 0
50   is_nullable: 0
51
52 =head2 password_allowed
53
54   data_type: 'tinyint'
55   default_value: 0
56   is_nullable: 0
57
58 =head2 staff_searchable
59
60   data_type: 'tinyint'
61   default_value: 0
62   is_nullable: 0
63
64 =head2 authorised_value_category
65
66   data_type: 'varchar'
67   is_nullable: 1
68   size: 10
69
70 =head2 display_checkout
71
72   data_type: 'tinyint'
73   default_value: 0
74   is_nullable: 0
75
76 =head2 category_code
77
78   data_type: 'varchar'
79   is_foreign_key: 1
80   is_nullable: 1
81   size: 10
82
83 =head2 class
84
85   data_type: 'varchar'
86   default_value: (empty string)
87   is_nullable: 0
88   size: 255
89
90 =cut
91
92 __PACKAGE__->add_columns(
93   "code",
94   { data_type => "varchar", is_nullable => 0, size => 10 },
95   "description",
96   { data_type => "varchar", is_nullable => 0, size => 255 },
97   "repeatable",
98   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
99   "unique_id",
100   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
101   "opac_display",
102   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
103   "password_allowed",
104   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
105   "staff_searchable",
106   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
107   "authorised_value_category",
108   { data_type => "varchar", is_nullable => 1, size => 10 },
109   "display_checkout",
110   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
111   "category_code",
112   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
113   "class",
114   { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
115 );
116 __PACKAGE__->set_primary_key("code");
117
118 =head1 RELATIONS
119
120 =head2 category_code
121
122 Type: belongs_to
123
124 Related object: L<Koha::Schema::Result::Category>
125
126 =cut
127
128 __PACKAGE__->belongs_to(
129   "category_code",
130   "Koha::Schema::Result::Category",
131   { categorycode => "category_code" },
132   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
133 );
134
135 =head2 borrower_attributes
136
137 Type: has_many
138
139 Related object: L<Koha::Schema::Result::BorrowerAttribute>
140
141 =cut
142
143 __PACKAGE__->has_many(
144   "borrower_attributes",
145   "Koha::Schema::Result::BorrowerAttribute",
146   { "foreign.code" => "self.code" },
147   { cascade_copy => 0, cascade_delete => 0 },
148 );
149
150
151 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
152 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EpdavGdH3uR/eaNLJIoHCg
153
154
155 # You can replace this text with custom content, and it will be preserved on regeneration
156 1;