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

(-)a/Koha/Schema/Result/AccountCredit.pm (+148 lines)
Line 0 Link Here
1
package Koha::Schema::Result::AccountCredit;
2
3
# Created by DBIx::Class::Schema::Loader
4
# DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6
use strict;
7
use warnings;
8
9
use base 'DBIx::Class::Core';
10
11
12
=head1 NAME
13
14
Koha::Schema::Result::AccountCredit
15
16
=cut
17
18
__PACKAGE__->table("account_credits");
19
20
=head1 ACCESSORS
21
22
=head2 credit_id
23
24
  data_type: 'integer'
25
  is_auto_increment: 1
26
  is_nullable: 0
27
28
=head2 borrowernumber
29
30
  data_type: 'integer'
31
  is_foreign_key: 1
32
  is_nullable: 0
33
34
=head2 type
35
36
  data_type: 'varchar'
37
  is_nullable: 0
38
  size: 255
39
40
=head2 amount_received
41
42
  data_type: 'decimal'
43
  is_nullable: 1
44
  size: [28,6]
45
46
=head2 amount_paid
47
48
  data_type: 'decimal'
49
  is_nullable: 0
50
  size: [28,6]
51
52
=head2 amount_remaining
53
54
  data_type: 'decimal'
55
  is_nullable: 0
56
  size: [28,6]
57
58
=head2 notes
59
60
  data_type: 'text'
61
  is_nullable: 1
62
63
=head2 manager_id
64
65
  data_type: 'integer'
66
  is_nullable: 1
67
68
=head2 created_on
69
70
  data_type: 'timestamp'
71
  is_nullable: 1
72
73
=head2 updated_on
74
75
  data_type: 'timestamp'
76
  is_nullable: 1
77
78
=cut
79
80
__PACKAGE__->add_columns(
81
  "credit_id",
82
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
83
  "borrowernumber",
84
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
85
  "type",
86
  { data_type => "varchar", is_nullable => 0, size => 255 },
87
  "amount_received",
88
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
89
  "amount_paid",
90
  { data_type => "decimal", is_nullable => 0, size => [28, 6] },
91
  "amount_remaining",
92
  { data_type => "decimal", is_nullable => 0, size => [28, 6] },
93
  "notes",
94
  { data_type => "text", is_nullable => 1 },
95
  "manager_id",
96
  { data_type => "integer", is_nullable => 1 },
97
  "created_on",
98
  { data_type => "timestamp", is_nullable => 1 },
99
  "updated_on",
100
  { data_type => "timestamp", is_nullable => 1 },
101
);
102
__PACKAGE__->set_primary_key("credit_id");
103
104
=head1 RELATIONS
105
106
=head2 borrowernumber
107
108
Type: belongs_to
109
110
Related object: L<Koha::Schema::Result::Borrower>
111
112
=cut
113
114
__PACKAGE__->belongs_to(
115
  "borrowernumber",
116
  "Koha::Schema::Result::Borrower",
117
  { borrowernumber => "borrowernumber" },
118
  { on_delete => "CASCADE", on_update => "CASCADE" },
119
);
120
121
=head2 account_offsets
122
123
Type: has_many
124
125
Related object: L<Koha::Schema::Result::AccountOffset>
126
127
=cut
128
129
__PACKAGE__->has_many(
130
  "account_offsets",
131
  "Koha::Schema::Result::AccountOffset",
132
  { "foreign.credit_id" => "self.credit_id" },
133
  { cascade_copy => 0, cascade_delete => 0 },
134
);
135
136
137
# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-11-25 14:00:11
138
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UA9pxIe/9NzHIESDZqCpVw
139
140
__PACKAGE__->belongs_to(
141
  "borrower",
142
  "Koha::Schema::Result::Borrower",
143
  { borrowernumber => "borrowernumber" },
144
);
145
146
147
# You can replace this text with custom content, and it will be preserved on regeneration
148
1;
(-)a/Koha/Schema/Result/AccountDebit.pm (+207 lines)
Line 0 Link Here
1
package Koha::Schema::Result::AccountDebit;
2
3
# Created by DBIx::Class::Schema::Loader
4
# DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6
use strict;
7
use warnings;
8
9
use base 'DBIx::Class::Core';
10
11
12
=head1 NAME
13
14
Koha::Schema::Result::AccountDebit
15
16
=cut
17
18
__PACKAGE__->table("account_debits");
19
20
=head1 ACCESSORS
21
22
=head2 debit_id
23
24
  data_type: 'integer'
25
  is_auto_increment: 1
26
  is_nullable: 0
27
28
=head2 borrowernumber
29
30
  data_type: 'integer'
31
  default_value: 0
32
  is_foreign_key: 1
33
  is_nullable: 0
34
35
=head2 itemnumber
36
37
  data_type: 'integer'
38
  is_nullable: 1
39
40
=head2 issue_id
41
42
  data_type: 'integer'
43
  is_nullable: 1
44
45
=head2 type
46
47
  data_type: 'varchar'
48
  is_nullable: 0
49
  size: 255
50
51
=head2 accruing
52
53
  data_type: 'tinyint'
54
  default_value: 0
55
  is_nullable: 0
56
57
=head2 amount_original
58
59
  data_type: 'decimal'
60
  is_nullable: 1
61
  size: [28,6]
62
63
=head2 amount_outstanding
64
65
  data_type: 'decimal'
66
  is_nullable: 1
67
  size: [28,6]
68
69
=head2 amount_last_increment
70
71
  data_type: 'decimal'
72
  is_nullable: 1
73
  size: [28,6]
74
75
=head2 description
76
77
  data_type: 'mediumtext'
78
  is_nullable: 1
79
80
=head2 notes
81
82
  data_type: 'text'
83
  is_nullable: 1
84
85
=head2 manager_id
86
87
  data_type: 'integer'
88
  is_nullable: 1
89
90
=head2 created_on
91
92
  data_type: 'timestamp'
93
  is_nullable: 1
94
95
=head2 updated_on
96
97
  data_type: 'timestamp'
98
  is_nullable: 1
99
100
=cut
101
102
__PACKAGE__->add_columns(
103
  "debit_id",
104
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
105
  "borrowernumber",
106
  {
107
    data_type      => "integer",
108
    default_value  => 0,
109
    is_foreign_key => 1,
110
    is_nullable    => 0,
111
  },
112
  "itemnumber",
113
  { data_type => "integer", is_nullable => 1 },
114
  "issue_id",
115
  { data_type => "integer", is_nullable => 1 },
116
  "type",
117
  { data_type => "varchar", is_nullable => 0, size => 255 },
118
  "accruing",
119
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
120
  "amount_original",
121
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
122
  "amount_outstanding",
123
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
124
  "amount_last_increment",
125
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
126
  "description",
127
  { data_type => "mediumtext", is_nullable => 1 },
128
  "notes",
129
  { data_type => "text", is_nullable => 1 },
130
  "manager_id",
131
  { data_type => "integer", is_nullable => 1 },
132
  "created_on",
133
  { data_type => "timestamp", is_nullable => 1 },
134
  "updated_on",
135
  { data_type => "timestamp", is_nullable => 1 },
136
);
137
__PACKAGE__->set_primary_key("debit_id");
138
139
=head1 RELATIONS
140
141
=head2 borrowernumber
142
143
Type: belongs_to
144
145
Related object: L<Koha::Schema::Result::Borrower>
146
147
=cut
148
149
__PACKAGE__->belongs_to(
150
  "borrowernumber",
151
  "Koha::Schema::Result::Borrower",
152
  { borrowernumber => "borrowernumber" },
153
  { on_delete => "CASCADE", on_update => "CASCADE" },
154
);
155
156
=head2 account_offsets
157
158
Type: has_many
159
160
Related object: L<Koha::Schema::Result::AccountOffset>
161
162
=cut
163
164
__PACKAGE__->has_many(
165
  "account_offsets",
166
  "Koha::Schema::Result::AccountOffset",
167
  { "foreign.debit_id" => "self.debit_id" },
168
  { cascade_copy => 0, cascade_delete => 0 },
169
);
170
171
172
# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-11-05 08:09:09
173
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ulQStZJSzcD4hvrPbtew4g
174
175
__PACKAGE__->belongs_to(
176
  "item",
177
  "Koha::Schema::Result::Item",
178
  { itemnumber => "itemnumber" }
179
);
180
181
__PACKAGE__->belongs_to(
182
  "deleted_item",
183
  "Koha::Schema::Result::Deleteditem",
184
  { itemnumber => "itemnumber" }
185
);
186
187
__PACKAGE__->belongs_to(
188
  "issue",
189
  "Koha::Schema::Result::Issue",
190
  { issue_id => "issue_id" }
191
);
192
193
__PACKAGE__->belongs_to(
194
  "old_issue",
195
  "Koha::Schema::Result::OldIssue",
196
  { issue_id => "issue_id" }
197
);
198
199
__PACKAGE__->belongs_to(
200
  "borrower",
201
  "Koha::Schema::Result::Borrower",
202
  { borrowernumber => "borrowernumber" },
203
  { on_delete => "CASCADE", on_update => "CASCADE" },
204
);
205
206
# You can replace this text with custom content, and it will be preserved on regeneration
207
1;
(-)a/Koha/Schema/Result/AccountOffset.pm (+118 lines)
Line 0 Link Here
1
package Koha::Schema::Result::AccountOffset;
2
3
# Created by DBIx::Class::Schema::Loader
4
# DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6
use strict;
7
use warnings;
8
9
use base 'DBIx::Class::Core';
10
11
12
=head1 NAME
13
14
Koha::Schema::Result::AccountOffset
15
16
=cut
17
18
__PACKAGE__->table("account_offsets");
19
20
=head1 ACCESSORS
21
22
=head2 offset_id
23
24
  data_type: 'integer'
25
  is_auto_increment: 1
26
  is_nullable: 0
27
28
=head2 debit_id
29
30
  data_type: 'integer'
31
  is_foreign_key: 1
32
  is_nullable: 1
33
34
=head2 credit_id
35
36
  data_type: 'integer'
37
  is_foreign_key: 1
38
  is_nullable: 1
39
40
=head2 type
41
42
  data_type: 'varchar'
43
  is_nullable: 1
44
  size: 255
45
46
=head2 amount
47
48
  data_type: 'decimal'
49
  is_nullable: 0
50
  size: [28,6]
51
52
=head2 created_on
53
54
  data_type: 'timestamp'
55
  default_value: current_timestamp
56
  is_nullable: 0
57
58
=cut
59
60
__PACKAGE__->add_columns(
61
  "offset_id",
62
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
63
  "debit_id",
64
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
65
  "credit_id",
66
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
67
  "type",
68
  { data_type => "varchar", is_nullable => 1, size => 255 },
69
  "amount",
70
  { data_type => "decimal", is_nullable => 0, size => [28, 6] },
71
  "created_on",
72
  {
73
    data_type     => "timestamp",
74
    default_value => \"current_timestamp",
75
    is_nullable   => 0,
76
  },
77
);
78
__PACKAGE__->set_primary_key("offset_id");
79
80
=head1 RELATIONS
81
82
=head2 debit
83
84
Type: belongs_to
85
86
Related object: L<Koha::Schema::Result::AccountDebit>
87
88
=cut
89
90
__PACKAGE__->belongs_to(
91
  "debit",
92
  "Koha::Schema::Result::AccountDebit",
93
  { debit_id => "debit_id" },
94
  { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
95
);
96
97
=head2 credit
98
99
Type: belongs_to
100
101
Related object: L<Koha::Schema::Result::AccountCredit>
102
103
=cut
104
105
__PACKAGE__->belongs_to(
106
  "credit",
107
  "Koha::Schema::Result::AccountCredit",
108
  { credit_id => "credit_id" },
109
  { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
110
);
111
112
113
# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-11-05 08:47:10
114
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BLjpL8skXmzxOQ/J0jzdvw
115
116
117
# You can replace this text with custom content, and it will be preserved on regeneration
118
1;
(-)a/Koha/Schema/Result/Borrower.pm (-75 / +62 lines)
Lines 1-21 Link Here
1
use utf8;
2
package Koha::Schema::Result::Borrower;
1
package Koha::Schema::Result::Borrower;
3
2
4
# Created by DBIx::Class::Schema::Loader
3
# Created by DBIx::Class::Schema::Loader
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
4
# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
5
7
=head1 NAME
8
9
Koha::Schema::Result::Borrower
10
11
=cut
12
13
use strict;
6
use strict;
14
use warnings;
7
use warnings;
15
8
16
use base 'DBIx::Class::Core';
9
use base 'DBIx::Class::Core';
17
10
18
=head1 TABLE: C<borrowers>
11
12
=head1 NAME
13
14
Koha::Schema::Result::Borrower
19
15
20
=cut
16
=cut
21
17
Lines 191-197 __PACKAGE__->table("borrowers"); Link Here
191
=head2 dateofbirth
187
=head2 dateofbirth
192
188
193
  data_type: 'date'
189
  data_type: 'date'
194
  datetime_undef_if_invalid: 1
195
  is_nullable: 1
190
  is_nullable: 1
196
191
197
=head2 branchcode
192
=head2 branchcode
Lines 213-225 __PACKAGE__->table("borrowers"); Link Here
213
=head2 dateenrolled
208
=head2 dateenrolled
214
209
215
  data_type: 'date'
210
  data_type: 'date'
216
  datetime_undef_if_invalid: 1
217
  is_nullable: 1
211
  is_nullable: 1
218
212
219
=head2 dateexpiry
213
=head2 dateexpiry
220
214
221
  data_type: 'date'
215
  data_type: 'date'
222
  datetime_undef_if_invalid: 1
223
  is_nullable: 1
216
  is_nullable: 1
224
217
225
=head2 gonenoaddress
218
=head2 gonenoaddress
Lines 235-241 __PACKAGE__->table("borrowers"); Link Here
235
=head2 debarred
228
=head2 debarred
236
229
237
  data_type: 'date'
230
  data_type: 'date'
238
  datetime_undef_if_invalid: 1
239
  is_nullable: 1
231
  is_nullable: 1
240
232
241
=head2 debarredcomment
233
=head2 debarredcomment
Lines 397-402 __PACKAGE__->table("borrowers"); Link Here
397
  default_value: 1
389
  default_value: 1
398
  is_nullable: 0
390
  is_nullable: 0
399
391
392
=head2 account_balance
393
394
  data_type: 'decimal'
395
  default_value: 0.000000
396
  is_nullable: 0
397
  size: [28,6]
398
400
=cut
399
=cut
401
400
402
__PACKAGE__->add_columns(
401
__PACKAGE__->add_columns(
Lines 463-469 __PACKAGE__->add_columns( Link Here
463
  "b_phone",
462
  "b_phone",
464
  { data_type => "mediumtext", is_nullable => 1 },
463
  { data_type => "mediumtext", is_nullable => 1 },
465
  "dateofbirth",
464
  "dateofbirth",
466
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
465
  { data_type => "date", is_nullable => 1 },
467
  "branchcode",
466
  "branchcode",
468
  {
467
  {
469
    data_type => "varchar",
468
    data_type => "varchar",
Lines 481-495 __PACKAGE__->add_columns( Link Here
481
    size => 10,
480
    size => 10,
482
  },
481
  },
483
  "dateenrolled",
482
  "dateenrolled",
484
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
483
  { data_type => "date", is_nullable => 1 },
485
  "dateexpiry",
484
  "dateexpiry",
486
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
485
  { data_type => "date", is_nullable => 1 },
487
  "gonenoaddress",
486
  "gonenoaddress",
488
  { data_type => "tinyint", is_nullable => 1 },
487
  { data_type => "tinyint", is_nullable => 1 },
489
  "lost",
488
  "lost",
490
  { data_type => "tinyint", is_nullable => 1 },
489
  { data_type => "tinyint", is_nullable => 1 },
491
  "debarred",
490
  "debarred",
492
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
491
  { data_type => "date", is_nullable => 1 },
493
  "debarredcomment",
492
  "debarredcomment",
494
  { data_type => "varchar", is_nullable => 1, size => 255 },
493
  { data_type => "varchar", is_nullable => 1, size => 255 },
495
  "contactname",
494
  "contactname",
Lines 546-580 __PACKAGE__->add_columns( Link Here
546
  { data_type => "varchar", is_nullable => 1, size => 50 },
545
  { data_type => "varchar", is_nullable => 1, size => 50 },
547
  "privacy",
546
  "privacy",
548
  { data_type => "integer", default_value => 1, is_nullable => 0 },
547
  { data_type => "integer", default_value => 1, is_nullable => 0 },
548
  "account_balance",
549
  {
550
    data_type => "decimal",
551
    default_value => "0.000000",
552
    is_nullable => 0,
553
    size => [28, 6],
554
  },
549
);
555
);
556
__PACKAGE__->set_primary_key("borrowernumber");
557
__PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]);
550
558
551
=head1 PRIMARY KEY
559
=head1 RELATIONS
552
560
553
=over 4
561
=head2 account_credits
554
562
555
=item * L</borrowernumber>
563
Type: has_many
556
564
557
=back
565
Related object: L<Koha::Schema::Result::AccountCredit>
558
566
559
=cut
567
=cut
560
568
561
__PACKAGE__->set_primary_key("borrowernumber");
569
__PACKAGE__->has_many(
562
570
  "account_credits",
563
=head1 UNIQUE CONSTRAINTS
571
  "Koha::Schema::Result::AccountCredit",
564
572
  { "foreign.borrowernumber" => "self.borrowernumber" },
565
=head2 C<cardnumber>
573
  { cascade_copy => 0, cascade_delete => 0 },
574
);
566
575
567
=over 4
576
=head2 account_debits
568
577
569
=item * L</cardnumber>
578
Type: has_many
570
579
571
=back
580
Related object: L<Koha::Schema::Result::AccountDebit>
572
581
573
=cut
582
=cut
574
583
575
__PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]);
584
__PACKAGE__->has_many(
576
585
  "account_debits",
577
=head1 RELATIONS
586
  "Koha::Schema::Result::AccountDebit",
587
  { "foreign.borrowernumber" => "self.borrowernumber" },
588
  { cascade_copy => 0, cascade_delete => 0 },
589
);
578
590
579
=head2 accountlines
591
=head2 accountlines
580
592
Lines 696-729 __PACKAGE__->has_many( Link Here
696
  { cascade_copy => 0, cascade_delete => 0 },
708
  { cascade_copy => 0, cascade_delete => 0 },
697
);
709
);
698
710
699
=head2 branchcode
711
=head2 categorycode
700
712
701
Type: belongs_to
713
Type: belongs_to
702
714
703
Related object: L<Koha::Schema::Result::Branch>
715
Related object: L<Koha::Schema::Result::Category>
704
716
705
=cut
717
=cut
706
718
707
__PACKAGE__->belongs_to(
719
__PACKAGE__->belongs_to(
708
  "branchcode",
720
  "categorycode",
709
  "Koha::Schema::Result::Branch",
721
  "Koha::Schema::Result::Category",
710
  { branchcode => "branchcode" },
722
  { categorycode => "categorycode" },
711
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
723
  { on_delete => "CASCADE", on_update => "CASCADE" },
712
);
724
);
713
725
714
=head2 categorycode
726
=head2 branchcode
715
727
716
Type: belongs_to
728
Type: belongs_to
717
729
718
Related object: L<Koha::Schema::Result::Category>
730
Related object: L<Koha::Schema::Result::Branch>
719
731
720
=cut
732
=cut
721
733
722
__PACKAGE__->belongs_to(
734
__PACKAGE__->belongs_to(
723
  "categorycode",
735
  "branchcode",
724
  "Koha::Schema::Result::Category",
736
  "Koha::Schema::Result::Branch",
725
  { categorycode => "categorycode" },
737
  { branchcode => "branchcode" },
726
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
738
  { on_delete => "CASCADE", on_update => "CASCADE" },
727
);
739
);
728
740
729
=head2 course_instructors
741
=head2 course_instructors
Lines 1041-1080 __PACKAGE__->has_many( Link Here
1041
  { cascade_copy => 0, cascade_delete => 0 },
1053
  { cascade_copy => 0, cascade_delete => 0 },
1042
);
1054
);
1043
1055
1044
=head2 basketnoes
1045
1046
Type: many_to_many
1047
1048
Composing rels: L</aqbasketusers> -> basketno
1049
1050
=cut
1051
1052
__PACKAGE__->many_to_many("basketnoes", "aqbasketusers", "basketno");
1053
1054
=head2 budgets
1055
1056
Type: many_to_many
1057
1058
Composing rels: L</aqbudgetborrowers> -> budget
1059
1060
=cut
1061
1062
__PACKAGE__->many_to_many("budgets", "aqbudgetborrowers", "budget");
1063
1064
=head2 courses
1065
1066
Type: many_to_many
1067
1056
1068
Composing rels: L</course_instructors> -> course
1057
# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-11-12 08:27:25
1069
1058
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CcXsGi7pVHQtO+YH3pY/1A
1070
=cut
1071
1072
__PACKAGE__->many_to_many("courses", "course_instructors", "course");
1073
1074
1075
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-31 16:31:19
1076
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:z4kW3xYX1CyrwvGdZu32nA
1077
1059
1060
__PACKAGE__->belongs_to(
1061
  "branch",
1062
  "Koha::Schema::Result::Branch",
1063
  { branchcode => "branchcode" },
1064
);
1078
1065
1079
# You can replace this text with custom content, and it will be preserved on regeneration
1066
# You can replace this text with custom content, and it will be preserved on regeneration
1080
1;
1067
1;
(-)a/Koha/Schema/Result/Deleteditem.pm (+11 lines)
Lines 366-371 __PACKAGE__->set_primary_key("itemnumber"); Link Here
366
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-11-27 17:52:57
366
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-11-27 17:52:57
367
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VssrrcYczPsiDBrtbsipIw
367
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VssrrcYczPsiDBrtbsipIw
368
368
369
__PACKAGE__->belongs_to(
370
  "biblio",
371
  "Koha::Schema::Result::Biblio",
372
  { biblionumber => "biblionumber" }
373
);
374
375
__PACKAGE__->belongs_to(
376
  "deleted_biblio",
377
  "Koha::Schema::Result::Deletedbiblio",
378
  { biblionumber => "biblionumber" }
379
);
369
380
370
# You can replace this text with custom content, and it will be preserved on regeneration
381
# You can replace this text with custom content, and it will be preserved on regeneration
371
1;
382
1;
(-)a/Koha/Schema/Result/Issue.pm (-51 / +31 lines)
Lines 1-21 Link Here
1
use utf8;
2
package Koha::Schema::Result::Issue;
1
package Koha::Schema::Result::Issue;
3
2
4
# Created by DBIx::Class::Schema::Loader
3
# Created by DBIx::Class::Schema::Loader
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
4
# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
5
7
=head1 NAME
8
9
Koha::Schema::Result::Issue
10
11
=cut
12
13
use strict;
6
use strict;
14
use warnings;
7
use warnings;
15
8
16
use base 'DBIx::Class::Core';
9
use base 'DBIx::Class::Core';
17
10
18
=head1 TABLE: C<issues>
11
12
=head1 NAME
13
14
Koha::Schema::Result::Issue
19
15
20
=cut
16
=cut
21
17
Lines 23-28 __PACKAGE__->table("issues"); Link Here
23
19
24
=head1 ACCESSORS
20
=head1 ACCESSORS
25
21
22
=head2 issue_id
23
24
  data_type: 'integer'
25
  is_auto_increment: 1
26
  is_nullable: 0
27
26
=head2 borrowernumber
28
=head2 borrowernumber
27
29
28
  data_type: 'integer'
30
  data_type: 'integer'
Lines 38-44 __PACKAGE__->table("issues"); Link Here
38
=head2 date_due
40
=head2 date_due
39
41
40
  data_type: 'datetime'
42
  data_type: 'datetime'
41
  datetime_undef_if_invalid: 1
42
  is_nullable: 1
43
  is_nullable: 1
43
44
44
=head2 branchcode
45
=head2 branchcode
Lines 56-68 __PACKAGE__->table("issues"); Link Here
56
=head2 returndate
57
=head2 returndate
57
58
58
  data_type: 'datetime'
59
  data_type: 'datetime'
59
  datetime_undef_if_invalid: 1
60
  is_nullable: 1
60
  is_nullable: 1
61
61
62
=head2 lastreneweddate
62
=head2 lastreneweddate
63
63
64
  data_type: 'datetime'
64
  data_type: 'datetime'
65
  datetime_undef_if_invalid: 1
66
  is_nullable: 1
65
  is_nullable: 1
67
66
68
=head2 return
67
=head2 return
Lines 79-141 __PACKAGE__->table("issues"); Link Here
79
=head2 timestamp
78
=head2 timestamp
80
79
81
  data_type: 'timestamp'
80
  data_type: 'timestamp'
82
  datetime_undef_if_invalid: 1
83
  default_value: current_timestamp
81
  default_value: current_timestamp
84
  is_nullable: 0
82
  is_nullable: 0
85
83
86
=head2 issuedate
84
=head2 issuedate
87
85
88
  data_type: 'datetime'
86
  data_type: 'datetime'
89
  datetime_undef_if_invalid: 1
90
  is_nullable: 1
87
  is_nullable: 1
91
88
92
=cut
89
=cut
93
90
94
__PACKAGE__->add_columns(
91
__PACKAGE__->add_columns(
92
  "issue_id",
93
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
95
  "borrowernumber",
94
  "borrowernumber",
96
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
95
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
97
  "itemnumber",
96
  "itemnumber",
98
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
97
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
99
  "date_due",
98
  "date_due",
100
  {
99
  { data_type => "datetime", is_nullable => 1 },
101
    data_type => "datetime",
102
    datetime_undef_if_invalid => 1,
103
    is_nullable => 1,
104
  },
105
  "branchcode",
100
  "branchcode",
106
  { data_type => "varchar", is_nullable => 1, size => 10 },
101
  { data_type => "varchar", is_nullable => 1, size => 10 },
107
  "issuingbranch",
102
  "issuingbranch",
108
  { data_type => "varchar", is_nullable => 1, size => 18 },
103
  { data_type => "varchar", is_nullable => 1, size => 18 },
109
  "returndate",
104
  "returndate",
110
  {
105
  { data_type => "datetime", is_nullable => 1 },
111
    data_type => "datetime",
112
    datetime_undef_if_invalid => 1,
113
    is_nullable => 1,
114
  },
115
  "lastreneweddate",
106
  "lastreneweddate",
116
  {
107
  { data_type => "datetime", is_nullable => 1 },
117
    data_type => "datetime",
118
    datetime_undef_if_invalid => 1,
119
    is_nullable => 1,
120
  },
121
  "return",
108
  "return",
122
  { data_type => "varchar", is_nullable => 1, size => 4 },
109
  { data_type => "varchar", is_nullable => 1, size => 4 },
123
  "renewals",
110
  "renewals",
124
  { data_type => "tinyint", is_nullable => 1 },
111
  { data_type => "tinyint", is_nullable => 1 },
125
  "timestamp",
112
  "timestamp",
126
  {
113
  {
127
    data_type => "timestamp",
114
    data_type     => "timestamp",
128
    datetime_undef_if_invalid => 1,
129
    default_value => \"current_timestamp",
115
    default_value => \"current_timestamp",
130
    is_nullable => 0,
116
    is_nullable   => 0,
131
  },
117
  },
132
  "issuedate",
118
  "issuedate",
133
  {
119
  { data_type => "datetime", is_nullable => 1 },
134
    data_type => "datetime",
135
    datetime_undef_if_invalid => 1,
136
    is_nullable => 1,
137
  },
138
);
120
);
121
__PACKAGE__->set_primary_key("issue_id");
139
122
140
=head1 RELATIONS
123
=head1 RELATIONS
141
124
Lines 151-162 __PACKAGE__->belongs_to( Link Here
151
  "borrowernumber",
134
  "borrowernumber",
152
  "Koha::Schema::Result::Borrower",
135
  "Koha::Schema::Result::Borrower",
153
  { borrowernumber => "borrowernumber" },
136
  { borrowernumber => "borrowernumber" },
154
  {
137
  { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
155
    is_deferrable => 1,
156
    join_type     => "LEFT",
157
    on_delete     => "CASCADE",
158
    on_update     => "CASCADE",
159
  },
160
);
138
);
161
139
162
=head2 itemnumber
140
=head2 itemnumber
Lines 171-193 __PACKAGE__->belongs_to( Link Here
171
  "itemnumber",
149
  "itemnumber",
172
  "Koha::Schema::Result::Item",
150
  "Koha::Schema::Result::Item",
173
  { itemnumber => "itemnumber" },
151
  { itemnumber => "itemnumber" },
174
  {
152
  { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
175
    is_deferrable => 1,
176
    join_type     => "LEFT",
177
    on_delete     => "CASCADE",
178
    on_update     => "CASCADE",
179
  },
180
);
153
);
181
154
182
155
183
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
156
# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-11-12 09:32:52
184
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZEh31EKBmURMKxDxI+H3EA
157
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zBewWFig+yZYtSkcIxCZpg
185
158
186
__PACKAGE__->belongs_to(
159
__PACKAGE__->belongs_to(
187
  "borrower",
160
  "borrower",
188
  "Koha::Schema::Result::Borrower",
161
  "Koha::Schema::Result::Borrower",
189
  { borrowernumber => "borrowernumber" },
162
  { borrowernumber => "borrowernumber" },
190
  { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
163
  { join_type => "LEFT" },
164
);
165
166
__PACKAGE__->belongs_to(
167
  "item",
168
  "Koha::Schema::Result::Item",
169
  { itemnumber => "itemnumber" },
170
  { join_type => "LEFT" },
191
);
171
);
192
172
193
1;
173
1;
(-)a/Koha/Schema/Result/OldIssue.pm (-2 / +27 lines)
Lines 183-188 __PACKAGE__->belongs_to( Link Here
183
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
183
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
184
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uPOxNROoMMRZ0qZsXsxEjA
184
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uPOxNROoMMRZ0qZsXsxEjA
185
185
186
__PACKAGE__->belongs_to(
187
  "borrower",
188
  "Koha::Schema::Result::Borrower",
189
  { borrowernumber => "borrowernumber" },
190
  { join_type => "LEFT" },
191
);
192
193
__PACKAGE__->belongs_to(
194
  "item",
195
  "Koha::Schema::Result::Item",
196
  { itemnumber => "itemnumber" },
197
  { join_type => "LEFT" },
198
);
199
200
__PACKAGE__->belongs_to(
201
  "deletedborrower",
202
  "Koha::Schema::Result::Deletedborrower",
203
  { borrowernumber => "borrowernumber" },
204
  { join_type => "LEFT" },
205
);
206
207
__PACKAGE__->belongs_to(
208
  "deleteditem",
209
  "Koha::Schema::Result::Deleteditem",
210
  { itemnumber => "itemnumber" },
211
  { join_type => "LEFT" },
212
);
186
213
187
# You can replace this text with custom content, and it will be preserved on regeneration
188
1;
214
1;
189
- 

Return to bug 6427