Bug 32257: Label for patron attributes misaligned
[koha-ffzg.git] / Koha / Schema / Result / PatronList.pm
1 use utf8;
2 package Koha::Schema::Result::PatronList;
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::PatronList
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<patron_lists>
19
20 =cut
21
22 __PACKAGE__->table("patron_lists");
23
24 =head1 ACCESSORS
25
26 =head2 patron_list_id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 unique identifier
33
34 =head2 name
35
36   data_type: 'varchar'
37   is_nullable: 0
38   size: 255
39
40 the list's name
41
42 =head2 owner
43
44   data_type: 'integer'
45   is_foreign_key: 1
46   is_nullable: 0
47
48 borrowernumber of the list creator
49
50 =head2 shared
51
52   data_type: 'tinyint'
53   default_value: 0
54   is_nullable: 1
55
56 =cut
57
58 __PACKAGE__->add_columns(
59   "patron_list_id",
60   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
61   "name",
62   { data_type => "varchar", is_nullable => 0, size => 255 },
63   "owner",
64   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
65   "shared",
66   { data_type => "tinyint", default_value => 0, is_nullable => 1 },
67 );
68
69 =head1 PRIMARY KEY
70
71 =over 4
72
73 =item * L</patron_list_id>
74
75 =back
76
77 =cut
78
79 __PACKAGE__->set_primary_key("patron_list_id");
80
81 =head1 RELATIONS
82
83 =head2 owner
84
85 Type: belongs_to
86
87 Related object: L<Koha::Schema::Result::Borrower>
88
89 =cut
90
91 __PACKAGE__->belongs_to(
92   "owner",
93   "Koha::Schema::Result::Borrower",
94   { borrowernumber => "owner" },
95   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
96 );
97
98 =head2 patron_list_patrons
99
100 Type: has_many
101
102 Related object: L<Koha::Schema::Result::PatronListPatron>
103
104 =cut
105
106 __PACKAGE__->has_many(
107   "patron_list_patrons",
108   "Koha::Schema::Result::PatronListPatron",
109   { "foreign.patron_list_id" => "self.patron_list_id" },
110   { cascade_copy => 0, cascade_delete => 0 },
111 );
112
113
114 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
115 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+gAlf5GQ7YSgAtFIXgqVWw
116
117
118 # You can replace this text with custom content, and it will be preserved on regeneration
119 1;