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