Bug 32257: Label for patron attributes misaligned
[koha-ffzg.git] / Koha / Schema / Result / AdditionalFieldValue.pm
1 use utf8;
2 package Koha::Schema::Result::AdditionalFieldValue;
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::AdditionalFieldValue
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<additional_field_values>
19
20 =cut
21
22 __PACKAGE__->table("additional_field_values");
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 field_id
35
36   data_type: 'integer'
37   is_foreign_key: 1
38   is_nullable: 0
39
40 foreign key references additional_fields(id)
41
42 =head2 record_id
43
44   data_type: 'integer'
45   is_nullable: 0
46
47 record_id
48
49 =head2 value
50
51   data_type: 'varchar'
52   default_value: (empty string)
53   is_nullable: 0
54   size: 255
55
56 value for this field
57
58 =cut
59
60 __PACKAGE__->add_columns(
61   "id",
62   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
63   "field_id",
64   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
65   "record_id",
66   { data_type => "integer", is_nullable => 0 },
67   "value",
68   { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
69 );
70
71 =head1 PRIMARY KEY
72
73 =over 4
74
75 =item * L</id>
76
77 =back
78
79 =cut
80
81 __PACKAGE__->set_primary_key("id");
82
83 =head1 UNIQUE CONSTRAINTS
84
85 =head2 C<field_record>
86
87 =over 4
88
89 =item * L</field_id>
90
91 =item * L</record_id>
92
93 =back
94
95 =cut
96
97 __PACKAGE__->add_unique_constraint("field_record", ["field_id", "record_id"]);
98
99 =head1 RELATIONS
100
101 =head2 field
102
103 Type: belongs_to
104
105 Related object: L<Koha::Schema::Result::AdditionalField>
106
107 =cut
108
109 __PACKAGE__->belongs_to(
110   "field",
111   "Koha::Schema::Result::AdditionalField",
112   { id => "field_id" },
113   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
114 );
115
116
117 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
118 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6Y4sBMbKYSbGN7fAy7OhEQ
119
120
121 # You can replace this text with custom code or comments, and it will be preserved on regeneration
122 1;