Line 0
Link Here
|
|
|
1 |
use utf8; |
2 |
package Koha::Schema::Result::ItemEditorTemplate; |
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::ItemEditorTemplate |
10 |
|
11 |
=cut |
12 |
|
13 |
use strict; |
14 |
use warnings; |
15 |
|
16 |
use base 'DBIx::Class::Core'; |
17 |
|
18 |
=head1 TABLE: C<item_editor_templates> |
19 |
|
20 |
=cut |
21 |
|
22 |
__PACKAGE__->table("item_editor_templates"); |
23 |
|
24 |
=head1 ACCESSORS |
25 |
|
26 |
=head2 id |
27 |
|
28 |
data_type: 'integer' |
29 |
is_auto_increment: 1 |
30 |
is_nullable: 0 |
31 |
|
32 |
id for the template |
33 |
|
34 |
=head2 borrowernumber |
35 |
|
36 |
data_type: 'integer' |
37 |
is_foreign_key: 1 |
38 |
is_nullable: 1 |
39 |
|
40 |
creator of this template |
41 |
|
42 |
=head2 name |
43 |
|
44 |
data_type: 'mediumtext' |
45 |
is_nullable: 0 |
46 |
|
47 |
template name |
48 |
|
49 |
=head2 is_shared |
50 |
|
51 |
data_type: 'tinyint' |
52 |
default_value: 0 |
53 |
is_nullable: 0 |
54 |
|
55 |
controls if template is shared |
56 |
|
57 |
=head2 contents |
58 |
|
59 |
data_type: 'longtext' |
60 |
is_nullable: 0 |
61 |
|
62 |
json encoded template data |
63 |
|
64 |
=cut |
65 |
|
66 |
__PACKAGE__->add_columns( |
67 |
"id", |
68 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
69 |
"borrowernumber", |
70 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, |
71 |
"name", |
72 |
{ data_type => "mediumtext", is_nullable => 0 }, |
73 |
"is_shared", |
74 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
75 |
"contents", |
76 |
{ data_type => "longtext", is_nullable => 0 }, |
77 |
); |
78 |
|
79 |
=head1 PRIMARY KEY |
80 |
|
81 |
=over 4 |
82 |
|
83 |
=item * L</id> |
84 |
|
85 |
=back |
86 |
|
87 |
=cut |
88 |
|
89 |
__PACKAGE__->set_primary_key("id"); |
90 |
|
91 |
=head1 RELATIONS |
92 |
|
93 |
=head2 borrowernumber |
94 |
|
95 |
Type: belongs_to |
96 |
|
97 |
Related object: L<Koha::Schema::Result::Borrower> |
98 |
|
99 |
=cut |
100 |
|
101 |
__PACKAGE__->belongs_to( |
102 |
"borrowernumber", |
103 |
"Koha::Schema::Result::Borrower", |
104 |
{ borrowernumber => "borrowernumber" }, |
105 |
{ |
106 |
is_deferrable => 1, |
107 |
join_type => "LEFT", |
108 |
on_delete => "SET NULL", |
109 |
on_update => "CASCADE", |
110 |
}, |
111 |
); |
112 |
|
113 |
|
114 |
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-28 16:49:35 |
115 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7JIe4z78F9oMOAnAZdqmtA |
116 |
|
117 |
sub koha_object_class { |
118 |
'Koha::Item::Template'; |
119 |
} |
120 |
sub koha_objects_class { |
121 |
'Koha::Item::Templates'; |
122 |
} |
123 |
|
124 |
1; |