|
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; |