Bug 23309: DBRev 19.06.00.021
[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   default_value: 8
105   is_nullable: 0
106
107 =head2 frameworkcode
108
109   data_type: 'varchar'
110   default_value: (empty string)
111   is_nullable: 0
112   size: 4
113
114 =head2 seealso
115
116   data_type: 'varchar'
117   is_nullable: 1
118   size: 1100
119
120 =head2 link
121
122   data_type: 'varchar'
123   is_nullable: 1
124   size: 80
125
126 =head2 defaultvalue
127
128   data_type: 'mediumtext'
129   is_nullable: 1
130
131 =head2 maxlength
132
133   data_type: 'integer'
134   default_value: 9999
135   is_nullable: 0
136
137 =cut
138
139 __PACKAGE__->add_columns(
140   "tagfield",
141   { data_type => "varchar", default_value => "", is_nullable => 0, size => 3 },
142   "tagsubfield",
143   { data_type => "varchar", default_value => "", is_nullable => 0, size => 1 },
144   "liblibrarian",
145   { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
146   "libopac",
147   { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
148   "repeatable",
149   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
150   "mandatory",
151   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
152   "kohafield",
153   { data_type => "varchar", is_nullable => 1, size => 40 },
154   "tab",
155   { data_type => "tinyint", is_nullable => 1 },
156   "authorised_value",
157   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 32 },
158   "authtypecode",
159   { data_type => "varchar", is_nullable => 1, size => 20 },
160   "value_builder",
161   { data_type => "varchar", is_nullable => 1, size => 80 },
162   "isurl",
163   { data_type => "tinyint", is_nullable => 1 },
164   "hidden",
165   { data_type => "tinyint", default_value => 8, is_nullable => 0 },
166   "frameworkcode",
167   { data_type => "varchar", default_value => "", is_nullable => 0, size => 4 },
168   "seealso",
169   { data_type => "varchar", is_nullable => 1, size => 1100 },
170   "link",
171   { data_type => "varchar", is_nullable => 1, size => 80 },
172   "defaultvalue",
173   { data_type => "mediumtext", is_nullable => 1 },
174   "maxlength",
175   { data_type => "integer", default_value => 9999, is_nullable => 0 },
176 );
177
178 =head1 PRIMARY KEY
179
180 =over 4
181
182 =item * L</frameworkcode>
183
184 =item * L</tagfield>
185
186 =item * L</tagsubfield>
187
188 =back
189
190 =cut
191
192 __PACKAGE__->set_primary_key("frameworkcode", "tagfield", "tagsubfield");
193
194 =head1 RELATIONS
195
196 =head2 authorised_value
197
198 Type: belongs_to
199
200 Related object: L<Koha::Schema::Result::AuthorisedValueCategory>
201
202 =cut
203
204 __PACKAGE__->belongs_to(
205   "authorised_value",
206   "Koha::Schema::Result::AuthorisedValueCategory",
207   { category_name => "authorised_value" },
208   {
209     is_deferrable => 1,
210     join_type     => "LEFT",
211     on_delete     => "SET NULL",
212     on_update     => "CASCADE",
213   },
214 );
215
216
217 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-08-15 08:12:17
218 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pq6quXdds+U1JejYlrkcOw
219
220
221 # You can replace this text with custom content, and it will be preserved on regeneration
222 1;