Bug 17855 - Followup patch following requests in comments 176 and 177
[koha.git] / Koha / Schema / Result / Discharge.pm
blob2a6878520c2db4ceced9ba0958ac6e387317e258
1 use utf8;
2 package Koha::Schema::Result::Discharge;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Discharge
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<discharges>
20 =cut
22 __PACKAGE__->table("discharges");
24 =head1 ACCESSORS
26 =head2 discharge_id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 borrower
34 data_type: 'integer'
35 is_foreign_key: 1
36 is_nullable: 1
38 =head2 needed
40 data_type: 'timestamp'
41 datetime_undef_if_invalid: 1
42 is_nullable: 1
44 =head2 validated
46 data_type: 'timestamp'
47 datetime_undef_if_invalid: 1
48 is_nullable: 1
50 =cut
52 __PACKAGE__->add_columns(
53 "discharge_id",
54 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
55 "borrower",
56 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
57 "needed",
59 data_type => "timestamp",
60 datetime_undef_if_invalid => 1,
61 is_nullable => 1,
63 "validated",
65 data_type => "timestamp",
66 datetime_undef_if_invalid => 1,
67 is_nullable => 1,
71 =head1 PRIMARY KEY
73 =over 4
75 =item * L</discharge_id>
77 =back
79 =cut
81 __PACKAGE__->set_primary_key("discharge_id");
83 =head1 RELATIONS
85 =head2 borrower
87 Type: belongs_to
89 Related object: L<Koha::Schema::Result::Borrower>
91 =cut
93 __PACKAGE__->belongs_to(
94 "borrower",
95 "Koha::Schema::Result::Borrower",
96 { borrowernumber => "borrower" },
98 is_deferrable => 1,
99 join_type => "LEFT",
100 on_delete => "CASCADE",
101 on_update => "CASCADE",
106 # Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-09-28 12:09:06
107 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Wc3EkS92v98jXtena5VaUQ
110 # You can replace this text with custom code or comments, and it will be preserved on regeneration