Bug 21797: Update two-column templates with Bootstrap grid: Acquisitions part 5
[koha.git] / Koha / Schema / Result / ItemsLastBorrower.pm
blob1a97cd7673ef8765eede483145a576d9fcc521ac
1 use utf8;
2 package Koha::Schema::Result::ItemsLastBorrower;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::ItemsLastBorrower
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<items_last_borrower>
20 =cut
22 __PACKAGE__->table("items_last_borrower");
24 =head1 ACCESSORS
26 =head2 id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 itemnumber
34 data_type: 'integer'
35 is_foreign_key: 1
36 is_nullable: 0
38 =head2 borrowernumber
40 data_type: 'integer'
41 is_foreign_key: 1
42 is_nullable: 0
44 =head2 created_on
46 data_type: 'timestamp'
47 datetime_undef_if_invalid: 1
48 default_value: current_timestamp
49 is_nullable: 0
51 =cut
53 __PACKAGE__->add_columns(
54 "id",
55 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
56 "itemnumber",
57 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
58 "borrowernumber",
59 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
60 "created_on",
62 data_type => "timestamp",
63 datetime_undef_if_invalid => 1,
64 default_value => \"current_timestamp",
65 is_nullable => 0,
69 =head1 PRIMARY KEY
71 =over 4
73 =item * L</id>
75 =back
77 =cut
79 __PACKAGE__->set_primary_key("id");
81 =head1 UNIQUE CONSTRAINTS
83 =head2 C<itemnumber>
85 =over 4
87 =item * L</itemnumber>
89 =back
91 =cut
93 __PACKAGE__->add_unique_constraint("itemnumber", ["itemnumber"]);
95 =head1 RELATIONS
97 =head2 borrowernumber
99 Type: belongs_to
101 Related object: L<Koha::Schema::Result::Borrower>
103 =cut
105 __PACKAGE__->belongs_to(
106 "borrowernumber",
107 "Koha::Schema::Result::Borrower",
108 { borrowernumber => "borrowernumber" },
109 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
112 =head2 itemnumber
114 Type: belongs_to
116 Related object: L<Koha::Schema::Result::Item>
118 =cut
120 __PACKAGE__->belongs_to(
121 "itemnumber",
122 "Koha::Schema::Result::Item",
123 { itemnumber => "itemnumber" },
124 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
128 # Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-10-02 12:33:33
129 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ByHKNZCEz4a1AqTnOJgUWA
132 # You can replace this text with custom code or comments, and it will be preserved on regeneration