Bug 32257: Label for patron attributes misaligned
[koha-ffzg.git] / Koha / Schema / Result / AdditionalField.pm
1 use utf8;
2 package Koha::Schema::Result::AdditionalField;
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::AdditionalField
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<additional_fields>
19
20 =cut
21
22 __PACKAGE__->table("additional_fields");
23
24 =head1 ACCESSORS
25
26 =head2 id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 primary key identifier
33
34 =head2 tablename
35
36   data_type: 'varchar'
37   default_value: (empty string)
38   is_nullable: 0
39   size: 255
40
41 tablename of the new field
42
43 =head2 name
44
45   data_type: 'varchar'
46   default_value: (empty string)
47   is_nullable: 0
48   size: 255
49
50 name of the field
51
52 =head2 authorised_value_category
53
54   data_type: 'varchar'
55   default_value: (empty string)
56   is_nullable: 0
57   size: 32
58
59 is an authorised value category
60
61 =head2 marcfield
62
63   data_type: 'varchar'
64   default_value: (empty string)
65   is_nullable: 0
66   size: 16
67
68 contains the marc field to copied into the record
69
70 =head2 searchable
71
72   data_type: 'tinyint'
73   default_value: 0
74   is_nullable: 0
75
76 is the field searchable?
77
78 =cut
79
80 __PACKAGE__->add_columns(
81   "id",
82   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
83   "tablename",
84   { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
85   "name",
86   { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
87   "authorised_value_category",
88   { data_type => "varchar", default_value => "", is_nullable => 0, size => 32 },
89   "marcfield",
90   { data_type => "varchar", default_value => "", is_nullable => 0, size => 16 },
91   "searchable",
92   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
93 );
94
95 =head1 PRIMARY KEY
96
97 =over 4
98
99 =item * L</id>
100
101 =back
102
103 =cut
104
105 __PACKAGE__->set_primary_key("id");
106
107 =head1 UNIQUE CONSTRAINTS
108
109 =head2 C<fields_uniq>
110
111 =over 4
112
113 =item * L</tablename>
114
115 =item * L</name>
116
117 =back
118
119 =cut
120
121 __PACKAGE__->add_unique_constraint("fields_uniq", ["tablename", "name"]);
122
123 =head1 RELATIONS
124
125 =head2 additional_field_values
126
127 Type: has_many
128
129 Related object: L<Koha::Schema::Result::AdditionalFieldValue>
130
131 =cut
132
133 __PACKAGE__->has_many(
134   "additional_field_values",
135   "Koha::Schema::Result::AdditionalFieldValue",
136   { "foreign.field_id" => "self.id" },
137   { cascade_copy => 0, cascade_delete => 0 },
138 );
139
140
141 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-01-19 06:49:06
142 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4GqBQNlfw8ITsUZH0GidsQ
143
144
145 # You can replace this text with custom code or comments, and it will be preserved on regeneration
146 1;