2 package Koha::Schema::Result::BorrowerAttribute;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
9 Koha::Schema::Result::BorrowerAttribute
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<borrower_attributes>
22 __PACKAGE__->table("borrower_attributes");
40 foreign key from the borrowers table, defines which patron/borrower has this attribute
49 foreign key from the borrower_attribute_types table, defines which custom field this value was entered for
57 custom patron field value
61 __PACKAGE__->add_columns(
63 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
65 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
67 { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
69 { data_type => "varchar", is_nullable => 1, size => 255 },
82 __PACKAGE__->set_primary_key("id");
90 Related object: L<Koha::Schema::Result::Borrower>
94 __PACKAGE__->belongs_to(
96 "Koha::Schema::Result::Borrower",
97 { borrowernumber => "borrowernumber" },
98 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
105 Related object: L<Koha::Schema::Result::BorrowerAttributeType>
109 __PACKAGE__->belongs_to(
111 "Koha::Schema::Result::BorrowerAttributeType",
113 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
117 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
118 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:P6K6sqVzIiwOgAAkAjQyiA
120 =head2 borrower_attribute_types
124 Related object: L<Koha::Schema::Result::BorrowerAttributeType>
128 __PACKAGE__->belongs_to(
129 "borrower_attribute_types",
130 "Koha::Schema::Result::BorrowerAttributeType",
131 { "foreign.code" => "self.code" },
132 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },);
135 sub koha_object_class {
136 'Koha::Patron::Attribute';
138 sub koha_objects_class {
139 'Koha::Patron::Attributes';