View | Details | Raw Unified | Return to bug 31028
Collapse All | Expand All

(-)a/Koha/Schema/Result/Biblio.pm (-2 / +17 lines)
Lines 540-545 __PACKAGE__->has_many( Link Here
540
  { cascade_copy => 0, cascade_delete => 0 },
540
  { cascade_copy => 0, cascade_delete => 0 },
541
);
541
);
542
542
543
=head2 tickets
544
545
Type: has_many
546
547
Related object: L<Koha::Schema::Result::Ticket>
548
549
=cut
550
551
__PACKAGE__->has_many(
552
  "tickets",
553
  "Koha::Schema::Result::Ticket",
554
  { "foreign.biblio_id" => "self.biblionumber" },
555
  { cascade_copy => 0, cascade_delete => 0 },
556
);
557
543
=head2 tmp_holdsqueues
558
=head2 tmp_holdsqueues
544
559
545
Type: has_many
560
Type: has_many
Lines 571-578 __PACKAGE__->has_many( Link Here
571
);
586
);
572
587
573
588
574
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-07-13 12:25:59
589
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-09 09:18:58
575
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:C1RZYgDcw6WrZ5laTaKV6w
590
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:joWQt2obRJMmiTLIvatB5Q
576
591
577
__PACKAGE__->has_many(
592
__PACKAGE__->has_many(
578
  "biblioitem",
593
  "biblioitem",
(-)a/Koha/Schema/Result/Borrower.pm (+45 lines)
Lines 1932-1937 __PACKAGE__->has_many( Link Here
1932
  { cascade_copy => 0, cascade_delete => 0 },
1932
  { cascade_copy => 0, cascade_delete => 0 },
1933
);
1933
);
1934
1934
1935
=head2 ticket_updates
1936
1937
Type: has_many
1938
1939
Related object: L<Koha::Schema::Result::TicketUpdate>
1940
1941
=cut
1942
1943
__PACKAGE__->has_many(
1944
  "ticket_updates",
1945
  "Koha::Schema::Result::TicketUpdate",
1946
  { "foreign.user_id" => "self.borrowernumber" },
1947
  { cascade_copy => 0, cascade_delete => 0 },
1948
);
1949
1950
=head2 tickets_reporters
1951
1952
Type: has_many
1953
1954
Related object: L<Koha::Schema::Result::Ticket>
1955
1956
=cut
1957
1958
__PACKAGE__->has_many(
1959
  "tickets_reporters",
1960
  "Koha::Schema::Result::Ticket",
1961
  { "foreign.reporter_id" => "self.borrowernumber" },
1962
  { cascade_copy => 0, cascade_delete => 0 },
1963
);
1964
1965
=head2 tickets_resolvers
1966
1967
Type: has_many
1968
1969
Related object: L<Koha::Schema::Result::Ticket>
1970
1971
=cut
1972
1973
__PACKAGE__->has_many(
1974
  "tickets_resolvers",
1975
  "Koha::Schema::Result::Ticket",
1976
  { "foreign.resolver_id" => "self.borrowernumber" },
1977
  { cascade_copy => 0, cascade_delete => 0 },
1978
);
1979
1935
=head2 tmp_holdsqueues
1980
=head2 tmp_holdsqueues
1936
1981
1937
Type: has_many
1982
Type: has_many
(-)a/Koha/Schema/Result/Ticket.pm (+215 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::Ticket;
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::Ticket
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<tickets>
19
20
=cut
21
22
__PACKAGE__->table("tickets");
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
33
34
=head2 reporter_id
35
36
  data_type: 'integer'
37
  default_value: 0
38
  is_foreign_key: 1
39
  is_nullable: 0
40
41
id of the patron who reported the ticket
42
43
=head2 reported_date
44
45
  data_type: 'timestamp'
46
  datetime_undef_if_invalid: 1
47
  default_value: current_timestamp
48
  is_nullable: 0
49
50
date and time this ticket was reported
51
52
=head2 title
53
54
  data_type: 'text'
55
  is_nullable: 0
56
57
ticket title
58
59
=head2 body
60
61
  data_type: 'text'
62
  is_nullable: 0
63
64
ticket details
65
66
=head2 resolver_id
67
68
  data_type: 'integer'
69
  is_foreign_key: 1
70
  is_nullable: 1
71
72
id of the user who resolved the ticket
73
74
=head2 resolved_date
75
76
  data_type: 'datetime'
77
  datetime_undef_if_invalid: 1
78
  is_nullable: 1
79
80
date and time this ticket was resolved
81
82
=head2 biblio_id
83
84
  data_type: 'integer'
85
  is_foreign_key: 1
86
  is_nullable: 1
87
88
id of biblio linked
89
90
=cut
91
92
__PACKAGE__->add_columns(
93
  "id",
94
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
95
  "reporter_id",
96
  {
97
    data_type      => "integer",
98
    default_value  => 0,
99
    is_foreign_key => 1,
100
    is_nullable    => 0,
101
  },
102
  "reported_date",
103
  {
104
    data_type => "timestamp",
105
    datetime_undef_if_invalid => 1,
106
    default_value => \"current_timestamp",
107
    is_nullable => 0,
108
  },
109
  "title",
110
  { data_type => "text", is_nullable => 0 },
111
  "body",
112
  { data_type => "text", is_nullable => 0 },
113
  "resolver_id",
114
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
115
  "resolved_date",
116
  {
117
    data_type => "datetime",
118
    datetime_undef_if_invalid => 1,
119
    is_nullable => 1,
120
  },
121
  "biblio_id",
122
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
123
);
124
125
=head1 PRIMARY KEY
126
127
=over 4
128
129
=item * L</id>
130
131
=back
132
133
=cut
134
135
__PACKAGE__->set_primary_key("id");
136
137
=head1 RELATIONS
138
139
=head2 biblio
140
141
Type: belongs_to
142
143
Related object: L<Koha::Schema::Result::Biblio>
144
145
=cut
146
147
__PACKAGE__->belongs_to(
148
  "biblio",
149
  "Koha::Schema::Result::Biblio",
150
  { biblionumber => "biblio_id" },
151
  {
152
    is_deferrable => 1,
153
    join_type     => "LEFT",
154
    on_delete     => "CASCADE",
155
    on_update     => "CASCADE",
156
  },
157
);
158
159
=head2 reporter
160
161
Type: belongs_to
162
163
Related object: L<Koha::Schema::Result::Borrower>
164
165
=cut
166
167
__PACKAGE__->belongs_to(
168
  "reporter",
169
  "Koha::Schema::Result::Borrower",
170
  { borrowernumber => "reporter_id" },
171
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
172
);
173
174
=head2 resolver
175
176
Type: belongs_to
177
178
Related object: L<Koha::Schema::Result::Borrower>
179
180
=cut
181
182
__PACKAGE__->belongs_to(
183
  "resolver",
184
  "Koha::Schema::Result::Borrower",
185
  { borrowernumber => "resolver_id" },
186
  {
187
    is_deferrable => 1,
188
    join_type     => "LEFT",
189
    on_delete     => "CASCADE",
190
    on_update     => "CASCADE",
191
  },
192
);
193
194
=head2 ticket_updates
195
196
Type: has_many
197
198
Related object: L<Koha::Schema::Result::TicketUpdate>
199
200
=cut
201
202
__PACKAGE__->has_many(
203
  "ticket_updates",
204
  "Koha::Schema::Result::TicketUpdate",
205
  { "foreign.ticket_id" => "self.id" },
206
  { cascade_copy => 0, cascade_delete => 0 },
207
);
208
209
210
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-10-24 21:15:34
211
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0Nm+y1BHJicrpeq3kuU1VA
212
213
214
# You can replace this text with custom code or comments, and it will be preserved on regeneration
215
1;
(-)a/Koha/Schema/Result/TicketUpdate.pm (-1 / +152 lines)
Line 0 Link Here
0
- 
1
use utf8;
2
package Koha::Schema::Result::TicketUpdate;
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::TicketUpdate
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<ticket_updates>
19
20
=cut
21
22
__PACKAGE__->table("ticket_updates");
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
33
34
=head2 ticket_id
35
36
  data_type: 'integer'
37
  is_foreign_key: 1
38
  is_nullable: 0
39
40
id of catalog ticket the update relates to
41
42
=head2 user_id
43
44
  data_type: 'integer'
45
  default_value: 0
46
  is_foreign_key: 1
47
  is_nullable: 0
48
49
id of the user who logged the update
50
51
=head2 public
52
53
  data_type: 'tinyint'
54
  default_value: 0
55
  is_nullable: 0
56
57
boolean flag to denote whether this update is public
58
59
=head2 date
60
61
  data_type: 'timestamp'
62
  datetime_undef_if_invalid: 1
63
  default_value: current_timestamp
64
  is_nullable: 0
65
66
date and time this update was logged
67
68
=head2 message
69
70
  data_type: 'text'
71
  is_nullable: 0
72
73
update message content
74
75
=cut
76
77
__PACKAGE__->add_columns(
78
  "id",
79
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
80
  "ticket_id",
81
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
82
  "user_id",
83
  {
84
    data_type      => "integer",
85
    default_value  => 0,
86
    is_foreign_key => 1,
87
    is_nullable    => 0,
88
  },
89
  "public",
90
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
91
  "date",
92
  {
93
    data_type => "timestamp",
94
    datetime_undef_if_invalid => 1,
95
    default_value => \"current_timestamp",
96
    is_nullable => 0,
97
  },
98
  "message",
99
  { data_type => "text", is_nullable => 0 },
100
);
101
102
=head1 PRIMARY KEY
103
104
=over 4
105
106
=item * L</id>
107
108
=back
109
110
=cut
111
112
__PACKAGE__->set_primary_key("id");
113
114
=head1 RELATIONS
115
116
=head2 ticket
117
118
Type: belongs_to
119
120
Related object: L<Koha::Schema::Result::Ticket>
121
122
=cut
123
124
__PACKAGE__->belongs_to(
125
  "ticket",
126
  "Koha::Schema::Result::Ticket",
127
  { id => "ticket_id" },
128
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
129
);
130
131
=head2 user
132
133
Type: belongs_to
134
135
Related object: L<Koha::Schema::Result::Borrower>
136
137
=cut
138
139
__PACKAGE__->belongs_to(
140
  "user",
141
  "Koha::Schema::Result::Borrower",
142
  { borrowernumber => "user_id" },
143
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
144
);
145
146
147
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-10-24 18:31:28
148
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8YG3jhlqbHWptc28pvBmrg
149
150
151
# You can replace this text with custom code or comments, and it will be preserved on regeneration
152
1;

Return to bug 31028