Bug 11844: Use additional fields for order lines
[koha.git] / Koha / Schema / Result / ErmAgreementPeriod.pm
1 use utf8;
2 package Koha::Schema::Result::ErmAgreementPeriod;
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::ErmAgreementPeriod
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<erm_agreement_periods>
19
20 =cut
21
22 __PACKAGE__->table("erm_agreement_periods");
23
24 =head1 ACCESSORS
25
26 =head2 agreement_period_id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 primary key
33
34 =head2 agreement_id
35
36   data_type: 'integer'
37   is_foreign_key: 1
38   is_nullable: 0
39
40 link to the agreement
41
42 =head2 started_on
43
44   data_type: 'date'
45   datetime_undef_if_invalid: 1
46   is_nullable: 0
47
48 start of the agreement period
49
50 =head2 ended_on
51
52   data_type: 'date'
53   datetime_undef_if_invalid: 1
54   is_nullable: 1
55
56 end of the agreement period
57
58 =head2 cancellation_deadline
59
60   data_type: 'date'
61   datetime_undef_if_invalid: 1
62   is_nullable: 1
63
64 Deadline for the cancellation
65
66 =head2 notes
67
68   data_type: 'mediumtext'
69   is_nullable: 1
70
71 notes about this period
72
73 =cut
74
75 __PACKAGE__->add_columns(
76   "agreement_period_id",
77   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
78   "agreement_id",
79   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
80   "started_on",
81   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 0 },
82   "ended_on",
83   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
84   "cancellation_deadline",
85   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
86   "notes",
87   { data_type => "mediumtext", is_nullable => 1 },
88 );
89
90 =head1 PRIMARY KEY
91
92 =over 4
93
94 =item * L</agreement_period_id>
95
96 =back
97
98 =cut
99
100 __PACKAGE__->set_primary_key("agreement_period_id");
101
102 =head1 RELATIONS
103
104 =head2 agreement
105
106 Type: belongs_to
107
108 Related object: L<Koha::Schema::Result::ErmAgreement>
109
110 =cut
111
112 __PACKAGE__->belongs_to(
113   "agreement",
114   "Koha::Schema::Result::ErmAgreement",
115   { agreement_id => "agreement_id" },
116   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
117 );
118
119
120 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-05-25 11:46:59
121 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NCQpSw+rp/9B/yOrtLtK6g
122
123 sub koha_object_class {
124     'Koha::ERM::Agreement::Period';
125 }
126 sub koha_objects_class {
127     'Koha::ERM::Agreement::Periods';
128 }
129
130 1;