|
Lines 1-17
Link Here
|
|
|
1 |
use utf8; |
| 1 |
package Koha::Schema::Result::Borrower; |
2 |
package Koha::Schema::Result::Borrower; |
| 2 |
|
3 |
|
| 3 |
# Created by DBIx::Class::Schema::Loader |
4 |
# Created by DBIx::Class::Schema::Loader |
| 4 |
# DO NOT MODIFY THE FIRST PART OF THIS FILE |
5 |
# DO NOT MODIFY THE FIRST PART OF THIS FILE |
| 5 |
|
6 |
|
|
|
7 |
=head1 NAME |
| 8 |
|
| 9 |
Koha::Schema::Result::Borrower |
| 10 |
|
| 11 |
=cut |
| 12 |
|
| 6 |
use strict; |
13 |
use strict; |
| 7 |
use warnings; |
14 |
use warnings; |
| 8 |
|
15 |
|
| 9 |
use base 'DBIx::Class::Core'; |
16 |
use base 'DBIx::Class::Core'; |
| 10 |
|
17 |
|
| 11 |
|
18 |
=head1 TABLE: C<borrowers> |
| 12 |
=head1 NAME |
|
|
| 13 |
|
| 14 |
Koha::Schema::Result::Borrower |
| 15 |
|
19 |
|
| 16 |
=cut |
20 |
=cut |
| 17 |
|
21 |
|
|
Lines 187-192
__PACKAGE__->table("borrowers");
Link Here
|
| 187 |
=head2 dateofbirth |
191 |
=head2 dateofbirth |
| 188 |
|
192 |
|
| 189 |
data_type: 'date' |
193 |
data_type: 'date' |
|
|
194 |
datetime_undef_if_invalid: 1 |
| 190 |
is_nullable: 1 |
195 |
is_nullable: 1 |
| 191 |
|
196 |
|
| 192 |
=head2 branchcode |
197 |
=head2 branchcode |
|
Lines 208-218
__PACKAGE__->table("borrowers");
Link Here
|
| 208 |
=head2 dateenrolled |
213 |
=head2 dateenrolled |
| 209 |
|
214 |
|
| 210 |
data_type: 'date' |
215 |
data_type: 'date' |
|
|
216 |
datetime_undef_if_invalid: 1 |
| 211 |
is_nullable: 1 |
217 |
is_nullable: 1 |
| 212 |
|
218 |
|
| 213 |
=head2 dateexpiry |
219 |
=head2 dateexpiry |
| 214 |
|
220 |
|
| 215 |
data_type: 'date' |
221 |
data_type: 'date' |
|
|
222 |
datetime_undef_if_invalid: 1 |
| 216 |
is_nullable: 1 |
223 |
is_nullable: 1 |
| 217 |
|
224 |
|
| 218 |
=head2 gonenoaddress |
225 |
=head2 gonenoaddress |
|
Lines 228-233
__PACKAGE__->table("borrowers");
Link Here
|
| 228 |
=head2 debarred |
235 |
=head2 debarred |
| 229 |
|
236 |
|
| 230 |
data_type: 'date' |
237 |
data_type: 'date' |
|
|
238 |
datetime_undef_if_invalid: 1 |
| 231 |
is_nullable: 1 |
239 |
is_nullable: 1 |
| 232 |
|
240 |
|
| 233 |
=head2 debarredcomment |
241 |
=head2 debarredcomment |
|
Lines 389-395
__PACKAGE__->table("borrowers");
Link Here
|
| 389 |
default_value: 1 |
397 |
default_value: 1 |
| 390 |
is_nullable: 0 |
398 |
is_nullable: 0 |
| 391 |
|
399 |
|
| 392 |
=head2 privacy_relative_checkouts |
400 |
=head2 privacy_guarantor_checkouts |
| 393 |
|
401 |
|
| 394 |
data_type: 'tinyint' |
402 |
data_type: 'tinyint' |
| 395 |
default_value: 0 |
403 |
default_value: 0 |
|
Lines 461-467
__PACKAGE__->add_columns(
Link Here
|
| 461 |
"b_phone", |
469 |
"b_phone", |
| 462 |
{ data_type => "mediumtext", is_nullable => 1 }, |
470 |
{ data_type => "mediumtext", is_nullable => 1 }, |
| 463 |
"dateofbirth", |
471 |
"dateofbirth", |
| 464 |
{ data_type => "date", is_nullable => 1 }, |
472 |
{ data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, |
| 465 |
"branchcode", |
473 |
"branchcode", |
| 466 |
{ |
474 |
{ |
| 467 |
data_type => "varchar", |
475 |
data_type => "varchar", |
|
Lines 479-493
__PACKAGE__->add_columns(
Link Here
|
| 479 |
size => 10, |
487 |
size => 10, |
| 480 |
}, |
488 |
}, |
| 481 |
"dateenrolled", |
489 |
"dateenrolled", |
| 482 |
{ data_type => "date", is_nullable => 1 }, |
490 |
{ data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, |
| 483 |
"dateexpiry", |
491 |
"dateexpiry", |
| 484 |
{ data_type => "date", is_nullable => 1 }, |
492 |
{ data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, |
| 485 |
"gonenoaddress", |
493 |
"gonenoaddress", |
| 486 |
{ data_type => "tinyint", is_nullable => 1 }, |
494 |
{ data_type => "tinyint", is_nullable => 1 }, |
| 487 |
"lost", |
495 |
"lost", |
| 488 |
{ data_type => "tinyint", is_nullable => 1 }, |
496 |
{ data_type => "tinyint", is_nullable => 1 }, |
| 489 |
"debarred", |
497 |
"debarred", |
| 490 |
{ data_type => "date", is_nullable => 1 }, |
498 |
{ data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, |
| 491 |
"debarredcomment", |
499 |
"debarredcomment", |
| 492 |
{ data_type => "varchar", is_nullable => 1, size => 255 }, |
500 |
{ data_type => "varchar", is_nullable => 1, size => 255 }, |
| 493 |
"contactname", |
501 |
"contactname", |
|
Lines 544-553
__PACKAGE__->add_columns(
Link Here
|
| 544 |
{ data_type => "varchar", is_nullable => 1, size => 50 }, |
552 |
{ data_type => "varchar", is_nullable => 1, size => 50 }, |
| 545 |
"privacy", |
553 |
"privacy", |
| 546 |
{ data_type => "integer", default_value => 1, is_nullable => 0 }, |
554 |
{ data_type => "integer", default_value => 1, is_nullable => 0 }, |
| 547 |
"privacy_relative_checkouts", |
555 |
"privacy_guarantor_checkouts", |
| 548 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
556 |
{ data_type => "tinyint", default_value => 0, is_nullable => 0 }, |
| 549 |
); |
557 |
); |
|
|
558 |
|
| 559 |
=head1 PRIMARY KEY |
| 560 |
|
| 561 |
=over 4 |
| 562 |
|
| 563 |
=item * L</borrowernumber> |
| 564 |
|
| 565 |
=back |
| 566 |
|
| 567 |
=cut |
| 568 |
|
| 550 |
__PACKAGE__->set_primary_key("borrowernumber"); |
569 |
__PACKAGE__->set_primary_key("borrowernumber"); |
|
|
570 |
|
| 571 |
=head1 UNIQUE CONSTRAINTS |
| 572 |
|
| 573 |
=head2 C<cardnumber> |
| 574 |
|
| 575 |
=over 4 |
| 576 |
|
| 577 |
=item * L</cardnumber> |
| 578 |
|
| 579 |
=back |
| 580 |
|
| 581 |
=cut |
| 582 |
|
| 551 |
__PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]); |
583 |
__PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]); |
| 552 |
|
584 |
|
| 553 |
=head1 RELATIONS |
585 |
=head1 RELATIONS |
|
Lines 672-705
__PACKAGE__->has_many(
Link Here
|
| 672 |
{ cascade_copy => 0, cascade_delete => 0 }, |
704 |
{ cascade_copy => 0, cascade_delete => 0 }, |
| 673 |
); |
705 |
); |
| 674 |
|
706 |
|
| 675 |
=head2 categorycode |
707 |
=head2 branchcode |
| 676 |
|
708 |
|
| 677 |
Type: belongs_to |
709 |
Type: belongs_to |
| 678 |
|
710 |
|
| 679 |
Related object: L<Koha::Schema::Result::Category> |
711 |
Related object: L<Koha::Schema::Result::Branch> |
| 680 |
|
712 |
|
| 681 |
=cut |
713 |
=cut |
| 682 |
|
714 |
|
| 683 |
__PACKAGE__->belongs_to( |
715 |
__PACKAGE__->belongs_to( |
| 684 |
"categorycode", |
716 |
"branchcode", |
| 685 |
"Koha::Schema::Result::Category", |
717 |
"Koha::Schema::Result::Branch", |
| 686 |
{ categorycode => "categorycode" }, |
718 |
{ branchcode => "branchcode" }, |
| 687 |
{ on_delete => "CASCADE", on_update => "CASCADE" }, |
719 |
{ is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, |
| 688 |
); |
720 |
); |
| 689 |
|
721 |
|
| 690 |
=head2 branchcode |
722 |
=head2 categorycode |
| 691 |
|
723 |
|
| 692 |
Type: belongs_to |
724 |
Type: belongs_to |
| 693 |
|
725 |
|
| 694 |
Related object: L<Koha::Schema::Result::Branch> |
726 |
Related object: L<Koha::Schema::Result::Category> |
| 695 |
|
727 |
|
| 696 |
=cut |
728 |
=cut |
| 697 |
|
729 |
|
| 698 |
__PACKAGE__->belongs_to( |
730 |
__PACKAGE__->belongs_to( |
| 699 |
"branchcode", |
731 |
"categorycode", |
| 700 |
"Koha::Schema::Result::Branch", |
732 |
"Koha::Schema::Result::Category", |
| 701 |
{ branchcode => "branchcode" }, |
733 |
{ categorycode => "categorycode" }, |
| 702 |
{ on_delete => "CASCADE", on_update => "CASCADE" }, |
734 |
{ is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, |
| 703 |
); |
735 |
); |
| 704 |
|
736 |
|
| 705 |
=head2 course_instructors |
737 |
=head2 course_instructors |
|
Lines 1017-1025
__PACKAGE__->has_many(
Link Here
|
| 1017 |
{ cascade_copy => 0, cascade_delete => 0 }, |
1049 |
{ cascade_copy => 0, cascade_delete => 0 }, |
| 1018 |
); |
1050 |
); |
| 1019 |
|
1051 |
|
|
|
1052 |
=head2 basketnoes |
| 1053 |
|
| 1054 |
Type: many_to_many |
| 1055 |
|
| 1056 |
Composing rels: L</aqbasketusers> -> basketno |
| 1057 |
|
| 1058 |
=cut |
| 1059 |
|
| 1060 |
__PACKAGE__->many_to_many("basketnoes", "aqbasketusers", "basketno"); |
| 1061 |
|
| 1062 |
=head2 budgets |
| 1063 |
|
| 1064 |
Type: many_to_many |
| 1065 |
|
| 1066 |
Composing rels: L</aqbudgetborrowers> -> budget |
| 1067 |
|
| 1068 |
=cut |
| 1069 |
|
| 1070 |
__PACKAGE__->many_to_many("budgets", "aqbudgetborrowers", "budget"); |
| 1071 |
|
| 1072 |
=head2 courses |
| 1073 |
|
| 1074 |
Type: many_to_many |
| 1075 |
|
| 1076 |
Composing rels: L</course_instructors> -> course |
| 1077 |
|
| 1078 |
=cut |
| 1079 |
|
| 1080 |
__PACKAGE__->many_to_many("courses", "course_instructors", "course"); |
| 1081 |
|
| 1020 |
|
1082 |
|
| 1021 |
# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-11-07 08:15:21 |
1083 |
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-06-26 13:01:03 |
| 1022 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TQTGI0fDt+xCFs+8nOarfA |
1084 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:W0T8L4w9Nr/mPXzoX0/Xjg |
| 1023 |
|
1085 |
|
| 1024 |
__PACKAGE__->belongs_to( |
1086 |
__PACKAGE__->belongs_to( |
| 1025 |
"guarantor", |
1087 |
"guarantor", |