Bug 23152: (RM follow-up) Add handling for Koha::Plugin::Methods
[koha.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 =head2 name
33
34   data_type: 'varchar'
35   is_nullable: 0
36   size: 255
37
38 =head2 owner
39
40   data_type: 'integer'
41   is_foreign_key: 1
42   is_nullable: 0
43
44 =head2 shared
45
46   data_type: 'tinyint'
47   default_value: 0
48   is_nullable: 1
49
50 =cut
51
52 __PACKAGE__->add_columns(
53   "patron_list_id",
54   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
55   "name",
56   { data_type => "varchar", is_nullable => 0, size => 255 },
57   "owner",
58   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
59   "shared",
60   { data_type => "tinyint", default_value => 0, is_nullable => 1 },
61 );
62
63 =head1 PRIMARY KEY
64
65 =over 4
66
67 =item * L</patron_list_id>
68
69 =back
70
71 =cut
72
73 __PACKAGE__->set_primary_key("patron_list_id");
74
75 =head1 RELATIONS
76
77 =head2 owner
78
79 Type: belongs_to
80
81 Related object: L<Koha::Schema::Result::Borrower>
82
83 =cut
84
85 __PACKAGE__->belongs_to(
86   "owner",
87   "Koha::Schema::Result::Borrower",
88   { borrowernumber => "owner" },
89   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
90 );
91
92 =head2 patron_list_patrons
93
94 Type: has_many
95
96 Related object: L<Koha::Schema::Result::PatronListPatron>
97
98 =cut
99
100 __PACKAGE__->has_many(
101   "patron_list_patrons",
102   "Koha::Schema::Result::PatronListPatron",
103   { "foreign.patron_list_id" => "self.patron_list_id" },
104   { cascade_copy => 0, cascade_delete => 0 },
105 );
106
107
108 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-07-18 16:54:33
109 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ulv0BHLlcWdeLgD6qPxmUQ
110
111
112 # You can replace this text with custom content, and it will be preserved on regeneration
113 1;