Bug 10565: Add a "Patron List" feature for storing and manipulating collections of...
[koha.git] / Koha / Schema / Result / PatronList.pm
1 package Koha::Schema::Result::PatronList;
2
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6 use strict;
7 use warnings;
8
9 use base 'DBIx::Class::Core';
10
11
12 =head1 NAME
13
14 Koha::Schema::Result::PatronList
15
16 =cut
17
18 __PACKAGE__->table("patron_lists");
19
20 =head1 ACCESSORS
21
22 =head2 patron_list_id
23
24   data_type: 'integer'
25   is_auto_increment: 1
26   is_nullable: 0
27
28 =head2 name
29
30   data_type: 'varchar'
31   is_nullable: 0
32   size: 255
33
34 =head2 owner
35
36   data_type: 'integer'
37   is_foreign_key: 1
38   is_nullable: 0
39
40 =cut
41
42 __PACKAGE__->add_columns(
43   "patron_list_id",
44   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
45   "name",
46   { data_type => "varchar", is_nullable => 0, size => 255 },
47   "owner",
48   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
49 );
50 __PACKAGE__->set_primary_key("patron_list_id");
51
52 =head1 RELATIONS
53
54 =head2 patron_list_patrons
55
56 Type: has_many
57
58 Related object: L<Koha::Schema::Result::PatronListPatron>
59
60 =cut
61
62 __PACKAGE__->has_many(
63   "patron_list_patrons",
64   "Koha::Schema::Result::PatronListPatron",
65   { "foreign.patron_list_id" => "self.patron_list_id" },
66   { cascade_copy => 0, cascade_delete => 0 },
67 );
68
69 =head2 owner
70
71 Type: belongs_to
72
73 Related object: L<Koha::Schema::Result::Borrower>
74
75 =cut
76
77 __PACKAGE__->belongs_to(
78   "owner",
79   "Koha::Schema::Result::Borrower",
80   { borrowernumber => "owner" },
81   { on_delete => "CASCADE", on_update => "CASCADE" },
82 );
83
84
85 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-07-10 10:39:50
86 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XegvNUkfR/cYwxlLLX3h3A
87
88
89 # You can replace this text with custom content, and it will be preserved on regeneration
90 1;