Bug 26346: Add option to make public lists editable by all staff
[koha.git] / Koha / Schema / Result / Linktracker.pm
1 use utf8;
2 package Koha::Schema::Result::Linktracker;
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::Linktracker
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<linktracker>
19
20 =cut
21
22 __PACKAGE__->table("linktracker");
23
24 =head1 ACCESSORS
25
26 =head2 id
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 primary key identifier
33
34 =head2 biblionumber
35
36   data_type: 'integer'
37   is_foreign_key: 1
38   is_nullable: 1
39
40 biblionumber of the record the link is from
41
42 =head2 itemnumber
43
44   data_type: 'integer'
45   is_foreign_key: 1
46   is_nullable: 1
47
48 itemnumber if applicable that the link was from
49
50 =head2 borrowernumber
51
52   data_type: 'integer'
53   is_foreign_key: 1
54   is_nullable: 1
55
56 borrowernumber who clicked the link
57
58 =head2 url
59
60   data_type: 'mediumtext'
61   is_nullable: 1
62
63 the link itself
64
65 =head2 timeclicked
66
67   data_type: 'datetime'
68   datetime_undef_if_invalid: 1
69   is_nullable: 1
70
71 the date and time the link was clicked
72
73 =cut
74
75 __PACKAGE__->add_columns(
76   "id",
77   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
78   "biblionumber",
79   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
80   "itemnumber",
81   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
82   "borrowernumber",
83   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
84   "url",
85   { data_type => "mediumtext", is_nullable => 1 },
86   "timeclicked",
87   {
88     data_type => "datetime",
89     datetime_undef_if_invalid => 1,
90     is_nullable => 1,
91   },
92 );
93
94 =head1 PRIMARY KEY
95
96 =over 4
97
98 =item * L</id>
99
100 =back
101
102 =cut
103
104 __PACKAGE__->set_primary_key("id");
105
106 =head1 RELATIONS
107
108 =head2 biblionumber
109
110 Type: belongs_to
111
112 Related object: L<Koha::Schema::Result::Biblio>
113
114 =cut
115
116 __PACKAGE__->belongs_to(
117   "biblionumber",
118   "Koha::Schema::Result::Biblio",
119   { biblionumber => "biblionumber" },
120   {
121     is_deferrable => 1,
122     join_type     => "LEFT",
123     on_delete     => "SET NULL",
124     on_update     => "SET NULL",
125   },
126 );
127
128 =head2 borrowernumber
129
130 Type: belongs_to
131
132 Related object: L<Koha::Schema::Result::Borrower>
133
134 =cut
135
136 __PACKAGE__->belongs_to(
137   "borrowernumber",
138   "Koha::Schema::Result::Borrower",
139   { borrowernumber => "borrowernumber" },
140   {
141     is_deferrable => 1,
142     join_type     => "LEFT",
143     on_delete     => "SET NULL",
144     on_update     => "SET NULL",
145   },
146 );
147
148 =head2 itemnumber
149
150 Type: belongs_to
151
152 Related object: L<Koha::Schema::Result::Item>
153
154 =cut
155
156 __PACKAGE__->belongs_to(
157   "itemnumber",
158   "Koha::Schema::Result::Item",
159   { itemnumber => "itemnumber" },
160   {
161     is_deferrable => 1,
162     join_type     => "LEFT",
163     on_delete     => "SET NULL",
164     on_update     => "SET NULL",
165   },
166 );
167
168
169 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-08-27 08:42:21
170 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ksT3i//fQn+HnBKt4YZlhg
171
172 sub koha_object_class {
173     'Koha::TrackedLink';
174 }
175 sub koha_objects_class {
176     'Koha::TrackedLinks';
177 }
178
179 1;