Bug 21395: Fix creation of PO file
[koha.git] / Koha / Schema / Result / BorrowerAttribute.pm
blob2a8398ad684f50733b16ce21f44049e60e7ae999
1 use utf8;
2 package Koha::Schema::Result::BorrowerAttribute;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::BorrowerAttribute
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<borrower_attributes>
20 =cut
22 __PACKAGE__->table("borrower_attributes");
24 =head1 ACCESSORS
26 =head2 id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 borrowernumber
34 data_type: 'integer'
35 is_foreign_key: 1
36 is_nullable: 0
38 =head2 code
40 data_type: 'varchar'
41 is_foreign_key: 1
42 is_nullable: 0
43 size: 10
45 =head2 attribute
47 data_type: 'varchar'
48 is_nullable: 1
49 size: 255
51 =cut
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 },
64 =head1 PRIMARY KEY
66 =over 4
68 =item * L</id>
70 =back
72 =cut
74 __PACKAGE__->set_primary_key("id");
76 =head1 RELATIONS
78 =head2 borrowernumber
80 Type: belongs_to
82 Related object: L<Koha::Schema::Result::Borrower>
84 =cut
86 __PACKAGE__->belongs_to(
87 "borrowernumber",
88 "Koha::Schema::Result::Borrower",
89 { borrowernumber => "borrowernumber" },
90 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
93 =head2 code
95 Type: belongs_to
97 Related object: L<Koha::Schema::Result::BorrowerAttributeType>
99 =cut
101 __PACKAGE__->belongs_to(
102 "code",
103 "Koha::Schema::Result::BorrowerAttributeType",
104 { code => "code" },
105 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
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
112 =head2 borrower_attribute_types
114 Type: belongs_to
116 Related object: L<Koha::Schema::Result::BorrowerAttributeType>
118 =cut
120 __PACKAGE__->belongs_to(
121 "borrower_attribute_types",
122 "Koha::Schema::Result::BorrowerAttributeType",
123 { "foreign.code" => "self.code" },
124 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },);
127 sub koha_object_class {
128 'Koha::Patron::Attribute';
130 sub koha_objects_class {
131 'Koha::Patron::Attributes';