Bug 22521: DBRev 18.12.00.055
[koha.git] / Koha / Schema / Result / MarcSubfieldStructure.pm
1 use utf8;
2 package Koha::Schema::Result::MarcSubfieldStructure;
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::MarcSubfieldStructure
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<marc_subfield_structure>
19
20 =cut
21
22 __PACKAGE__->table("marc_subfield_structure");
23
24 =head1 ACCESSORS
25
26 =head2 tagfield
27
28   data_type: 'varchar'
29   default_value: (empty string)
30   is_nullable: 0
31   size: 3
32
33 =head2 tagsubfield
34
35   data_type: 'varchar'
36   default_value: (empty string)
37   is_nullable: 0
38   size: 1
39
40 =head2 liblibrarian
41
42   data_type: 'varchar'
43   default_value: (empty string)
44   is_nullable: 0
45   size: 255
46
47 =head2 libopac
48
49   data_type: 'varchar'
50   default_value: (empty string)
51   is_nullable: 0
52   size: 255
53
54 =head2 repeatable
55
56   data_type: 'tinyint'
57   default_value: 0
58   is_nullable: 0
59
60 =head2 mandatory
61
62   data_type: 'tinyint'
63   default_value: 0
64   is_nullable: 0
65
66 =head2 kohafield
67
68   data_type: 'varchar'
69   is_nullable: 1
70   size: 40
71
72 =head2 tab
73
74   data_type: 'tinyint'
75   is_nullable: 1
76
77 =head2 authorised_value
78
79   data_type: 'varchar'
80   is_foreign_key: 1
81   is_nullable: 1
82   size: 32
83
84 =head2 authtypecode
85
86   data_type: 'varchar'
87   is_nullable: 1
88   size: 20
89
90 =head2 value_builder
91
92   data_type: 'varchar'
93   is_nullable: 1
94   size: 80
95
96 =head2 isurl
97
98   data_type: 'tinyint'
99   is_nullable: 1
100
101 =head2 hidden
102
103   data_type: 'tinyint'
104   is_nullable: 1
105
106 =head2 frameworkcode
107
108   data_type: 'varchar'
109   default_value: (empty string)
110   is_nullable: 0
111   size: 4
112
113 =head2 seealso
114
115   data_type: 'varchar'
116   is_nullable: 1
117   size: 1100
118
119 =head2 link
120
121   data_type: 'varchar'
122   is_nullable: 1
123   size: 80
124
125 =head2 defaultvalue
126
127   data_type: 'mediumtext'
128   is_nullable: 1
129
130 =head2 maxlength
131
132   data_type: 'integer'
133   default_value: 9999
134   is_nullable: 0
135
136 =cut
137
138 __PACKAGE__->add_columns(
139   "tagfield",
140   { data_type => "varchar", default_value => "", is_nullable => 0, size => 3 },
141   "tagsubfield",
142   { data_type => "varchar", default_value => "", is_nullable => 0, size => 1 },
143   "liblibrarian",
144   { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
145   "libopac",
146   { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
147   "repeatable",
148   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
149   "mandatory",
150   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
151   "kohafield",
152   { data_type => "varchar", is_nullable => 1, size => 40 },
153   "tab",
154   { data_type => "tinyint", is_nullable => 1 },
155   "authorised_value",
156   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 32 },
157   "authtypecode",
158   { data_type => "varchar", is_nullable => 1, size => 20 },
159   "value_builder",
160   { data_type => "varchar", is_nullable => 1, size => 80 },
161   "isurl",
162   { data_type => "tinyint", is_nullable => 1 },
163   "hidden",
164   { data_type => "tinyint", is_nullable => 1 },
165   "frameworkcode",
166   { data_type => "varchar", default_value => "", is_nullable => 0, size => 4 },
167   "seealso",
168   { data_type => "varchar", is_nullable => 1, size => 1100 },
169   "link",
170   { data_type => "varchar", is_nullable => 1, size => 80 },
171   "defaultvalue",
172   { data_type => "mediumtext", is_nullable => 1 },
173   "maxlength",
174   { data_type => "integer", default_value => 9999, is_nullable => 0 },
175 );
176
177 =head1 PRIMARY KEY
178
179 =over 4
180
181 =item * L</frameworkcode>
182
183 =item * L</tagfield>
184
185 =item * L</tagsubfield>
186
187 =back
188
189 =cut
190
191 __PACKAGE__->set_primary_key("frameworkcode", "tagfield", "tagsubfield");
192
193 =head1 RELATIONS
194
195 =head2 authorised_value
196
197 Type: belongs_to
198
199 Related object: L<Koha::Schema::Result::AuthorisedValueCategory>
200
201 =cut
202
203 __PACKAGE__->belongs_to(
204   "authorised_value",
205   "Koha::Schema::Result::AuthorisedValueCategory",
206   { category_name => "authorised_value" },
207   {
208     is_deferrable => 1,
209     join_type     => "LEFT",
210     on_delete     => "SET NULL",
211     on_update     => "CASCADE",
212   },
213 );
214
215
216 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-02 18:57:57
217 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:18iBiNNiwTSYtKk28aoLJg
218
219
220 # You can replace this text with custom content, and it will be preserved on regeneration
221 1;