Bug 33606: (QA follow-up) Cosmetic changes
[koha.git] / Koha / Schema / Result / ErmAgreementLicense.pm
1 use utf8;
2 package Koha::Schema::Result::ErmAgreementLicense;
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::ErmAgreementLicense
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<erm_agreement_licenses>
19
20 =cut
21
22 __PACKAGE__->table("erm_agreement_licenses");
23
24 =head1 ACCESSORS
25
26 =head2 agreement_license_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 license_id
43
44   data_type: 'integer'
45   is_foreign_key: 1
46   is_nullable: 0
47
48 link to the license
49
50 =head2 status
51
52   data_type: 'varchar'
53   is_nullable: 0
54   size: 80
55
56 current status of the license
57
58 =head2 physical_location
59
60   data_type: 'varchar'
61   is_nullable: 1
62   size: 80
63
64 physical location of the license
65
66 =head2 notes
67
68   data_type: 'mediumtext'
69   is_nullable: 1
70
71 notes about this license
72
73 =head2 uri
74
75   data_type: 'varchar'
76   is_nullable: 1
77   size: 255
78
79 URI of the license
80
81 =cut
82
83 __PACKAGE__->add_columns(
84   "agreement_license_id",
85   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
86   "agreement_id",
87   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
88   "license_id",
89   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
90   "status",
91   { data_type => "varchar", is_nullable => 0, size => 80 },
92   "physical_location",
93   { data_type => "varchar", is_nullable => 1, size => 80 },
94   "notes",
95   { data_type => "mediumtext", is_nullable => 1 },
96   "uri",
97   { data_type => "varchar", is_nullable => 1, size => 255 },
98 );
99
100 =head1 PRIMARY KEY
101
102 =over 4
103
104 =item * L</agreement_license_id>
105
106 =back
107
108 =cut
109
110 __PACKAGE__->set_primary_key("agreement_license_id");
111
112 =head1 UNIQUE CONSTRAINTS
113
114 =head2 C<erm_agreement_licenses_uniq>
115
116 =over 4
117
118 =item * L</agreement_id>
119
120 =item * L</license_id>
121
122 =back
123
124 =cut
125
126 __PACKAGE__->add_unique_constraint("erm_agreement_licenses_uniq", ["agreement_id", "license_id"]);
127
128 =head1 RELATIONS
129
130 =head2 agreement
131
132 Type: belongs_to
133
134 Related object: L<Koha::Schema::Result::ErmAgreement>
135
136 =cut
137
138 __PACKAGE__->belongs_to(
139   "agreement",
140   "Koha::Schema::Result::ErmAgreement",
141   { agreement_id => "agreement_id" },
142   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
143 );
144
145 =head2 license
146
147 Type: belongs_to
148
149 Related object: L<Koha::Schema::Result::ErmLicense>
150
151 =cut
152
153 __PACKAGE__->belongs_to(
154   "license",
155   "Koha::Schema::Result::ErmLicense",
156   { license_id => "license_id" },
157   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
158 );
159
160
161 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-07-20 08:58:20
162 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pO0QPWFMSap1XER+0hdEqg
163
164 sub koha_object_class {
165     'Koha::ERM::Agreement::License';
166 }
167 sub koha_objects_class {
168     'Koha::ERM::Agreement::Licenses';
169 }
170
171 1;