Bug 32257: Label for patron attributes misaligned
[koha-ffzg.git] / Koha / Schema / Result / BorrowerDebarment.pm
1 use utf8;
2 package Koha::Schema::Result::BorrowerDebarment;
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::BorrowerDebarment
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<borrower_debarments>
19
20 =cut
21
22 __PACKAGE__->table("borrower_debarments");
23
24 =head1 ACCESSORS
25
26 =head2 borrower_debarment_id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 unique key for the restriction
33
34 =head2 borrowernumber
35
36   data_type: 'integer'
37   is_foreign_key: 1
38   is_nullable: 0
39
40 foreign key for borrowers.borrowernumber for patron who is restricted
41
42 =head2 expiration
43
44   data_type: 'date'
45   datetime_undef_if_invalid: 1
46   is_nullable: 1
47
48 expiration date of the restriction
49
50 =head2 type
51
52   data_type: 'varchar'
53   is_foreign_key: 1
54   is_nullable: 0
55   size: 50
56
57 type of restriction, FK to restriction_types.code
58
59 =head2 comment
60
61   data_type: 'mediumtext'
62   is_nullable: 1
63
64 comments about the restriction
65
66 =head2 manager_id
67
68   data_type: 'integer'
69   is_nullable: 1
70
71 foreign key for borrowers.borrowernumber for the librarian managing the restriction
72
73 =head2 created
74
75   data_type: 'timestamp'
76   datetime_undef_if_invalid: 1
77   default_value: current_timestamp
78   is_nullable: 0
79
80 date the restriction was added
81
82 =head2 updated
83
84   data_type: 'timestamp'
85   datetime_undef_if_invalid: 1
86   is_nullable: 1
87
88 date the restriction was updated
89
90 =cut
91
92 __PACKAGE__->add_columns(
93   "borrower_debarment_id",
94   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
95   "borrowernumber",
96   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
97   "expiration",
98   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
99   "type",
100   { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 50 },
101   "comment",
102   { data_type => "mediumtext", is_nullable => 1 },
103   "manager_id",
104   { data_type => "integer", is_nullable => 1 },
105   "created",
106   {
107     data_type => "timestamp",
108     datetime_undef_if_invalid => 1,
109     default_value => \"current_timestamp",
110     is_nullable => 0,
111   },
112   "updated",
113   {
114     data_type => "timestamp",
115     datetime_undef_if_invalid => 1,
116     is_nullable => 1,
117   },
118 );
119
120 =head1 PRIMARY KEY
121
122 =over 4
123
124 =item * L</borrower_debarment_id>
125
126 =back
127
128 =cut
129
130 __PACKAGE__->set_primary_key("borrower_debarment_id");
131
132 =head1 RELATIONS
133
134 =head2 borrowernumber
135
136 Type: belongs_to
137
138 Related object: L<Koha::Schema::Result::Borrower>
139
140 =cut
141
142 __PACKAGE__->belongs_to(
143   "borrowernumber",
144   "Koha::Schema::Result::Borrower",
145   { borrowernumber => "borrowernumber" },
146   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
147 );
148
149 =head2 type
150
151 Type: belongs_to
152
153 Related object: L<Koha::Schema::Result::RestrictionType>
154
155 =cut
156
157 __PACKAGE__->belongs_to(
158   "type",
159   "Koha::Schema::Result::RestrictionType",
160   { code => "type" },
161   { is_deferrable => 1, on_delete => "NO ACTION", on_update => "CASCADE" },
162 );
163
164
165 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-08-19 17:53:04
166 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kDCkA7XrjKXlrFG5lk8Lgg
167
168
169 # You can replace this text with custom code or comments, and it will be preserved on regeneration
170 1;