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

(-)a/Koha/Schema/Result/AccountCredit.pm (+172 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 branchcode
64
65
  data_type: 'varchar'
66
  is_foreign_key: 1
67
  is_nullable: 1
68
  size: 10
69
70
=head2 manager_id
71
72
  data_type: 'integer'
73
  is_nullable: 1
74
75
=head2 created_on
76
77
  data_type: 'timestamp'
78
  is_nullable: 1
79
80
=head2 updated_on
81
82
  data_type: 'timestamp'
83
  is_nullable: 1
84
85
=cut
86
87
__PACKAGE__->add_columns(
88
  "credit_id",
89
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
90
  "borrowernumber",
91
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
92
  "type",
93
  { data_type => "varchar", is_nullable => 0, size => 255 },
94
  "amount_received",
95
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
96
  "amount_paid",
97
  { data_type => "decimal", is_nullable => 0, size => [28, 6] },
98
  "amount_remaining",
99
  { data_type => "decimal", is_nullable => 0, size => [28, 6] },
100
  "notes",
101
  { data_type => "text", is_nullable => 1 },
102
  "branchcode",
103
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
104
  "manager_id",
105
  { data_type => "integer", is_nullable => 1 },
106
  "created_on",
107
  { data_type => "timestamp", is_nullable => 1 },
108
  "updated_on",
109
  { data_type => "timestamp", is_nullable => 1 },
110
);
111
__PACKAGE__->set_primary_key("credit_id");
112
113
=head1 RELATIONS
114
115
=head2 branchcode
116
117
Type: belongs_to
118
119
Related object: L<Koha::Schema::Result::Branch>
120
121
=cut
122
123
__PACKAGE__->belongs_to(
124
  "branchcode",
125
  "Koha::Schema::Result::Branch",
126
  { branchcode => "branchcode" },
127
  { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
128
);
129
130
=head2 borrowernumber
131
132
Type: belongs_to
133
134
Related object: L<Koha::Schema::Result::Borrower>
135
136
=cut
137
138
__PACKAGE__->belongs_to(
139
  "borrowernumber",
140
  "Koha::Schema::Result::Borrower",
141
  { borrowernumber => "borrowernumber" },
142
  { on_delete => "CASCADE", on_update => "CASCADE" },
143
);
144
145
=head2 account_offsets
146
147
Type: has_many
148
149
Related object: L<Koha::Schema::Result::AccountOffset>
150
151
=cut
152
153
__PACKAGE__->has_many(
154
  "account_offsets",
155
  "Koha::Schema::Result::AccountOffset",
156
  { "foreign.credit_id" => "self.credit_id" },
157
  { cascade_copy => 0, cascade_delete => 0 },
158
);
159
160
161
# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-12-11 14:04:23
162
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2VUFELBmtChTTprhmJGq6A
163
164
__PACKAGE__->belongs_to(
165
  "borrower",
166
  "Koha::Schema::Result::Borrower",
167
  { borrowernumber => "borrowernumber" },
168
);
169
170
171
# You can replace this text with custom content, and it will be preserved on regeneration
172
1;
(-)a/Koha/Schema/Result/AccountDebit.pm (+215 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 branchcode
86
87
  data_type: 'varchar'
88
  is_nullable: 1
89
  size: 10
90
91
=head2 manager_id
92
93
  data_type: 'integer'
94
  is_nullable: 1
95
96
=head2 created_on
97
98
  data_type: 'timestamp'
99
  is_nullable: 1
100
101
=head2 updated_on
102
103
  data_type: 'timestamp'
104
  is_nullable: 1
105
106
=cut
107
108
__PACKAGE__->add_columns(
109
  "debit_id",
110
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
111
  "borrowernumber",
112
  {
113
    data_type      => "integer",
114
    default_value  => 0,
115
    is_foreign_key => 1,
116
    is_nullable    => 0,
117
  },
118
  "itemnumber",
119
  { data_type => "integer", is_nullable => 1 },
120
  "issue_id",
121
  { data_type => "integer", is_nullable => 1 },
122
  "type",
123
  { data_type => "varchar", is_nullable => 0, size => 255 },
124
  "accruing",
125
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
126
  "amount_original",
127
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
128
  "amount_outstanding",
129
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
130
  "amount_last_increment",
131
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
132
  "description",
133
  { data_type => "mediumtext", is_nullable => 1 },
134
  "notes",
135
  { data_type => "text", is_nullable => 1 },
136
  "branchcode",
137
  { data_type => "varchar", is_nullable => 1, size => 10 },
138
  "manager_id",
139
  { data_type => "integer", is_nullable => 1 },
140
  "created_on",
141
  { data_type => "timestamp", is_nullable => 1 },
142
  "updated_on",
143
  { data_type => "timestamp", is_nullable => 1 },
144
);
145
__PACKAGE__->set_primary_key("debit_id");
146
147
=head1 RELATIONS
148
149
=head2 borrowernumber
150
151
Type: belongs_to
152
153
Related object: L<Koha::Schema::Result::Borrower>
154
155
=cut
156
157
__PACKAGE__->belongs_to(
158
  "borrowernumber",
159
  "Koha::Schema::Result::Borrower",
160
  { borrowernumber => "borrowernumber" },
161
  { on_delete => "CASCADE", on_update => "CASCADE" },
162
);
163
164
=head2 account_offsets
165
166
Type: has_many
167
168
Related object: L<Koha::Schema::Result::AccountOffset>
169
170
=cut
171
172
__PACKAGE__->has_many(
173
  "account_offsets",
174
  "Koha::Schema::Result::AccountOffset",
175
  { "foreign.debit_id" => "self.debit_id" },
176
  { cascade_copy => 0, cascade_delete => 0 },
177
);
178
179
180
# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-12-11 14:04:23
181
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Yab38AGb5Wh6YEhUyoUPmw
182
183
__PACKAGE__->belongs_to(
184
  "item",
185
  "Koha::Schema::Result::Item",
186
  { itemnumber => "itemnumber" }
187
);
188
189
__PACKAGE__->belongs_to(
190
  "deleted_item",
191
  "Koha::Schema::Result::Deleteditem",
192
  { itemnumber => "itemnumber" }
193
);
194
195
__PACKAGE__->belongs_to(
196
  "issue",
197
  "Koha::Schema::Result::Issue",
198
  { issue_id => "issue_id" }
199
);
200
201
__PACKAGE__->belongs_to(
202
  "old_issue",
203
  "Koha::Schema::Result::OldIssue",
204
  { issue_id => "issue_id" }
205
);
206
207
__PACKAGE__->belongs_to(
208
  "borrower",
209
  "Koha::Schema::Result::Borrower",
210
  { borrowernumber => "borrowernumber" },
211
  { on_delete => "CASCADE", on_update => "CASCADE" },
212
);
213
214
# You can replace this text with custom content, and it will be preserved on regeneration
215
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/Branch.pm (-33 / +23 lines)
Lines 1-21 Link Here
1
use utf8;
2
package Koha::Schema::Result::Branch;
1
package Koha::Schema::Result::Branch;
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::Branch
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<branches>
11
12
=head1 NAME
13
14
Koha::Schema::Result::Branch
19
15
20
=cut
16
=cut
21
17
Lines 158-177 __PACKAGE__->add_columns( Link Here
158
  "opac_info",
154
  "opac_info",
159
  { data_type => "text", is_nullable => 1 },
155
  { data_type => "text", is_nullable => 1 },
160
);
156
);
157
__PACKAGE__->set_primary_key("branchcode");
161
158
162
=head1 PRIMARY KEY
159
=head1 RELATIONS
163
160
164
=over 4
161
=head2 account_credits
165
162
166
=item * L</branchcode>
163
Type: has_many
167
164
168
=back
165
Related object: L<Koha::Schema::Result::AccountCredit>
169
166
170
=cut
167
=cut
171
168
172
__PACKAGE__->set_primary_key("branchcode");
169
__PACKAGE__->has_many(
173
170
  "account_credits",
174
=head1 RELATIONS
171
  "Koha::Schema::Result::AccountCredit",
172
  { "foreign.branchcode" => "self.branchcode" },
173
  { cascade_copy => 0, cascade_delete => 0 },
174
);
175
175
176
=head2 aqbaskets
176
=head2 aqbaskets
177
177
Lines 383-389 __PACKAGE__->has_many( Link Here
383
  { cascade_copy => 0, cascade_delete => 0 },
383
  { cascade_copy => 0, cascade_delete => 0 },
384
);
384
);
385
385
386
=head2 items_holdingbranches
386
=head2 items_homebranches
387
387
388
Type: has_many
388
Type: has_many
389
389
Lines 392-404 Related object: L<Koha::Schema::Result::Item> Link Here
392
=cut
392
=cut
393
393
394
__PACKAGE__->has_many(
394
__PACKAGE__->has_many(
395
  "items_holdingbranches",
395
  "items_homebranches",
396
  "Koha::Schema::Result::Item",
396
  "Koha::Schema::Result::Item",
397
  { "foreign.holdingbranch" => "self.branchcode" },
397
  { "foreign.homebranch" => "self.branchcode" },
398
  { cascade_copy => 0, cascade_delete => 0 },
398
  { cascade_copy => 0, cascade_delete => 0 },
399
);
399
);
400
400
401
=head2 items_homebranches
401
=head2 items_holdingbranches
402
402
403
Type: has_many
403
Type: has_many
404
404
Lines 407-415 Related object: L<Koha::Schema::Result::Item> Link Here
407
=cut
407
=cut
408
408
409
__PACKAGE__->has_many(
409
__PACKAGE__->has_many(
410
  "items_homebranches",
410
  "items_holdingbranches",
411
  "Koha::Schema::Result::Item",
411
  "Koha::Schema::Result::Item",
412
  { "foreign.homebranch" => "self.branchcode" },
412
  { "foreign.holdingbranch" => "self.branchcode" },
413
  { cascade_copy => 0, cascade_delete => 0 },
413
  { cascade_copy => 0, cascade_delete => 0 },
414
);
414
);
415
415
Lines 458-476 __PACKAGE__->has_many( Link Here
458
  { cascade_copy => 0, cascade_delete => 0 },
458
  { cascade_copy => 0, cascade_delete => 0 },
459
);
459
);
460
460
461
=head2 categorycodes
462
463
Type: many_to_many
464
465
Composing rels: L</branchrelations> -> categorycode
466
467
=cut
468
469
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
470
471
461
472
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-31 16:31:19
462
# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-12-11 14:04:23
473
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PKoXMUUg0NUf/xVDBkPOqQ
463
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4mrPkdXUCQ8hvdDg7rs8Ng
474
464
475
465
476
# You can replace this text with custom content, and it will be preserved on regeneration
466
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Deleteditem.pm (+11 lines)
Lines 383-388 __PACKAGE__->set_primary_key("itemnumber"); Link Here
383
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-12-23 16:39:42
383
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-12-23 16:39:42
384
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ji1W0q5g5xTw1J89cjVlWw
384
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ji1W0q5g5xTw1J89cjVlWw
385
385
386
__PACKAGE__->belongs_to(
387
  "biblio",
388
  "Koha::Schema::Result::Biblio",
389
  { biblionumber => "biblionumber" }
390
);
391
392
__PACKAGE__->belongs_to(
393
  "deleted_biblio",
394
  "Koha::Schema::Result::Deletedbiblio",
395
  { biblionumber => "biblionumber" }
396
);
386
397
387
# You can replace this text with custom content, and it will be preserved on regeneration
398
# You can replace this text with custom content, and it will be preserved on regeneration
388
1;
399
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