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

(-)a/Koha/Schema/Result/Borrower.pm (+1374 lines)
Lines 973-978 __PACKAGE__->has_many( Link Here
973
  { cascade_copy => 0, cascade_delete => 0 },
973
  { cascade_copy => 0, cascade_delete => 0 },
974
);
974
);
975
975
976
=head2 illrequests
977
978
Type: has_many
979
980
Related object: L<Koha::Schema::Result::Illrequest>
981
982
=cut
983
984
__PACKAGE__->has_many(
985
  "illrequests",
986
  "Koha::Schema::Result::Illrequest",
987
  { "foreign.borrowernumber" => "self.borrowernumber" },
988
  { cascade_copy => 0, cascade_delete => 0 },
989
);
990
991
=head2 issues
992
993
Type: has_many
994
995
Related object: L<Koha::Schema::Result::Issue>
996
997
=cut
998
999
__PACKAGE__->has_many(
1000
  "issues",
1001
  "Koha::Schema::Result::Issue",
1002
  { "foreign.borrowernumber" => "self.borrowernumber" },
1003
  { cascade_copy => 0, cascade_delete => 0 },
1004
);
1005
1006
=head2 items_last_borrowers
1007
1008
Type: has_many
1009
1010
Related object: L<Koha::Schema::Result::ItemsLastBorrower>
1011
1012
=cut
1013
1014
__PACKAGE__->has_many(
1015
  "items_last_borrowers",
1016
  "Koha::Schema::Result::ItemsLastBorrower",
1017
  { "foreign.borrowernumber" => "self.borrowernumber" },
1018
  { cascade_copy => 0, cascade_delete => 0 },
1019
);
1020
1021
=head2 message_queues
1022
1023
Type: has_many
1024
1025
Related object: L<Koha::Schema::Result::MessageQueue>
1026
1027
=cut
1028
1029
__PACKAGE__->has_many(
1030
  "message_queues",
1031
  "Koha::Schema::Result::MessageQueue",
1032
  { "foreign.borrowernumber" => "self.borrowernumber" },
1033
  { cascade_copy => 0, cascade_delete => 0 },
1034
);
1035
1036
=head2 messages
1037
1038
Type: has_many
1039
1040
Related object: L<Koha::Schema::Result::Message>
1041
1042
=cut
1043
1044
__PACKAGE__->has_many(
1045
  "messages",
1046
  "Koha::Schema::Result::Message",
1047
  { "foreign.manager_id" => "self.borrowernumber" },
1048
  { cascade_copy => 0, cascade_delete => 0 },
1049
);
1050
1051
=head2 old_issues
1052
1053
Type: has_many
1054
1055
Related object: L<Koha::Schema::Result::OldIssue>
1056
1057
=cut
1058
1059
__PACKAGE__->has_many(
1060
  "old_issues",
1061
  "Koha::Schema::Result::OldIssue",
1062
  { "foreign.borrowernumber" => "self.borrowernumber" },
1063
  { cascade_copy => 0, cascade_delete => 0 },
1064
);
1065
1066
=head2 old_reserves
1067
1068
Type: has_many
1069
1070
Related object: L<Koha::Schema::Result::OldReserve>
1071
1072
=cut
1073
1074
__PACKAGE__->has_many(
1075
  "old_reserves",
1076
  "Koha::Schema::Result::OldReserve",
1077
  { "foreign.borrowernumber" => "self.borrowernumber" },
1078
  { cascade_copy => 0, cascade_delete => 0 },
1079
);
1080
1081
=head2 opac_news
1082
1083
Type: has_many
1084
1085
Related object: L<Koha::Schema::Result::OpacNews>
1086
1087
=cut
1088
1089
__PACKAGE__->has_many(
1090
  "opac_news",
1091
  "Koha::Schema::Result::OpacNews",
1092
  { "foreign.borrowernumber" => "self.borrowernumber" },
1093
  { cascade_copy => 0, cascade_delete => 0 },
1094
);
1095
1096
=head2 patron_list_patrons
1097
1098
Type: has_many
1099
1100
Related object: L<Koha::Schema::Result::PatronListPatron>
1101
1102
=cut
1103
1104
__PACKAGE__->has_many(
1105
  "patron_list_patrons",
1106
  "Koha::Schema::Result::PatronListPatron",
1107
  { "foreign.borrowernumber" => "self.borrowernumber" },
1108
  { cascade_copy => 0, cascade_delete => 0 },
1109
);
1110
1111
=head2 patron_lists
1112
1113
Type: has_many
1114
1115
Related object: L<Koha::Schema::Result::PatronList>
1116
1117
=cut
1118
1119
__PACKAGE__->has_many(
1120
  "patron_lists",
1121
  "Koha::Schema::Result::PatronList",
1122
  { "foreign.owner" => "self.borrowernumber" },
1123
  { cascade_copy => 0, cascade_delete => 0 },
1124
);
1125
1126
=head2 patronimage
1127
1128
Type: might_have
1129
1130
Related object: L<Koha::Schema::Result::Patronimage>
1131
1132
=cut
1133
1134
__PACKAGE__->might_have(
1135
  "patronimage",
1136
  "Koha::Schema::Result::Patronimage",
1137
  { "foreign.borrowernumber" => "self.borrowernumber" },
1138
  { cascade_copy => 0, cascade_delete => 0 },
1139
);
1140
1141
=head2 ratings
1142
1143
Type: has_many
1144
1145
Related object: L<Koha::Schema::Result::Rating>
1146
1147
=cut
1148
1149
__PACKAGE__->has_many(
1150
  "ratings",
1151
  "Koha::Schema::Result::Rating",
1152
  { "foreign.borrowernumber" => "self.borrowernumber" },
1153
  { cascade_copy => 0, cascade_delete => 0 },
1154
);
1155
1156
=head2 reserves
1157
1158
Type: has_many
1159
1160
Related object: L<Koha::Schema::Result::Reserve>
1161
1162
=cut
1163
1164
__PACKAGE__->has_many(
1165
  "reserves",
1166
  "Koha::Schema::Result::Reserve",
1167
  { "foreign.borrowernumber" => "self.borrowernumber" },
1168
  { cascade_copy => 0, cascade_delete => 0 },
1169
);
1170
1171
=head2 reviews
1172
1173
Type: has_many
1174
1175
Related object: L<Koha::Schema::Result::Review>
1176
1177
=cut
1178
1179
__PACKAGE__->has_many(
1180
  "reviews",
1181
  "Koha::Schema::Result::Review",
1182
  { "foreign.borrowernumber" => "self.borrowernumber" },
1183
  { cascade_copy => 0, cascade_delete => 0 },
1184
);
1185
1186
=head2 sms_provider
1187
1188
Type: belongs_to
1189
1190
Related object: L<Koha::Schema::Result::SmsProvider>
1191
1192
=cut
1193
1194
__PACKAGE__->belongs_to(
1195
  "sms_provider",
1196
  "Koha::Schema::Result::SmsProvider",
1197
  { id => "sms_provider_id" },
1198
  {
1199
    is_deferrable => 1,
1200
    join_type     => "LEFT",
1201
    on_delete     => "SET NULL",
1202
    on_update     => "CASCADE",
1203
  },
1204
);
1205
1206
=head2 subscriptionroutinglists
1207
1208
Type: has_many
1209
1210
Related object: L<Koha::Schema::Result::Subscriptionroutinglist>
1211
1212
=cut
1213
1214
__PACKAGE__->has_many(
1215
  "subscriptionroutinglists",
1216
  "Koha::Schema::Result::Subscriptionroutinglist",
1217
  { "foreign.borrowernumber" => "self.borrowernumber" },
1218
  { cascade_copy => 0, cascade_delete => 0 },
1219
);
1220
1221
=head2 tags_all
1222
1223
Type: has_many
1224
1225
Related object: L<Koha::Schema::Result::TagAll>
1226
1227
=cut
1228
1229
__PACKAGE__->has_many(
1230
  "tags_all",
1231
  "Koha::Schema::Result::TagAll",
1232
  { "foreign.borrowernumber" => "self.borrowernumber" },
1233
  { cascade_copy => 0, cascade_delete => 0 },
1234
);
1235
1236
=head2 tags_approvals
1237
1238
Type: has_many
1239
1240
Related object: L<Koha::Schema::Result::TagsApproval>
1241
1242
=cut
1243
1244
__PACKAGE__->has_many(
1245
  "tags_approvals",
1246
  "Koha::Schema::Result::TagsApproval",
1247
  { "foreign.approved_by" => "self.borrowernumber" },
1248
  { cascade_copy => 0, cascade_delete => 0 },
1249
);
1250
1251
=head2 user_permissions
1252
1253
Type: has_many
1254
1255
Related object: L<Koha::Schema::Result::UserPermission>
1256
1257
=cut
1258
1259
__PACKAGE__->has_many(
1260
  "user_permissions",
1261
  "Koha::Schema::Result::UserPermission",
1262
  { "foreign.borrowernumber" => "self.borrowernumber" },
1263
  { cascade_copy => 0, cascade_delete => 0 },
1264
);
1265
1266
=head2 virtualshelfcontents
1267
1268
Type: has_many
1269
1270
Related object: L<Koha::Schema::Result::Virtualshelfcontent>
1271
1272
=cut
1273
1274
__PACKAGE__->has_many(
1275
  "virtualshelfcontents",
1276
  "Koha::Schema::Result::Virtualshelfcontent",
1277
  { "foreign.borrowernumber" => "self.borrowernumber" },
1278
  { cascade_copy => 0, cascade_delete => 0 },
1279
);
1280
1281
=head2 virtualshelfshares
1282
1283
Type: has_many
1284
1285
Related object: L<Koha::Schema::Result::Virtualshelfshare>
1286
1287
=cut
1288
1289
__PACKAGE__->has_many(
1290
  "virtualshelfshares",
1291
  "Koha::Schema::Result::Virtualshelfshare",
1292
  { "foreign.borrowernumber" => "self.borrowernumber" },
1293
  { cascade_copy => 0, cascade_delete => 0 },
1294
);
1295
1296
=head2 virtualshelves
1297
1298
Type: has_many
1299
1300
Related object: L<Koha::Schema::Result::Virtualshelve>
1301
1302
=cut
1303
1304
__PACKAGE__->has_many(
1305
  "virtualshelves",
1306
  "Koha::Schema::Result::Virtualshelve",
1307
  { "foreign.owner" => "self.borrowernumber" },
1308
  { cascade_copy => 0, cascade_delete => 0 },
1309
);
1310
1311
=head2 basketnoes
1312
1313
Type: many_to_many
1314
1315
Composing rels: L</aqbasketusers> -> basketno
1316
1317
=cut
1318
1319
__PACKAGE__->many_to_many("basketnoes", "aqbasketusers", "basketno");
1320
1321
=head2 budgets
1322
1323
Type: many_to_many
1324
1325
Composing rels: L</aqbudgetborrowers> -> budget
1326
1327
=cut
1328
1329
__PACKAGE__->many_to_many("budgets", "aqbudgetborrowers", "budget");
1330
1331
=head2 courses
1332
1333
Type: many_to_many
1334
1335
Composing rels: L</course_instructors> -> course
1336
1337
=cut
1338
1339
__PACKAGE__->many_to_many("courses", "course_instructors", "course");
1340
1341
=head2 ordernumbers
1342
1343
Type: many_to_many
1344
1345
Composing rels: L</aqorder_users> -> ordernumber
1346
1347
=cut
1348
1349
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1350
1351
1352
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-02-03 16:55:44
1353
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6poutI9U1NshzV7amXSl+g
1354
# These lines were loaded from '/home/alex/src/koha/Koha/Schema/Result/Borrower.pm' found in @INC.
1355
# They are now part of the custom portion of this file
1356
# for you to hand-edit.  If you do not either delete
1357
# this section or remove that file from @INC, this section
1358
# will be repeated redundantly when you re-create this
1359
# file again via Loader!  See skip_load_external to disable
1360
# this feature.
1361
1362
use utf8;
1363
package Koha::Schema::Result::Borrower;
1364
1365
# Created by DBIx::Class::Schema::Loader
1366
# DO NOT MODIFY THE FIRST PART OF THIS FILE
1367
1368
=head1 NAME
1369
1370
Koha::Schema::Result::Borrower
1371
1372
=cut
1373
1374
use strict;
1375
use warnings;
1376
1377
use base 'DBIx::Class::Core';
1378
1379
=head1 TABLE: C<borrowers>
1380
1381
=cut
1382
1383
__PACKAGE__->table("borrowers");
1384
1385
=head1 ACCESSORS
1386
1387
=head2 borrowernumber
1388
1389
  data_type: 'integer'
1390
  is_auto_increment: 1
1391
  is_nullable: 0
1392
1393
=head2 cardnumber
1394
1395
  data_type: 'varchar'
1396
  is_nullable: 1
1397
  size: 16
1398
1399
=head2 surname
1400
1401
  data_type: 'mediumtext'
1402
  is_nullable: 0
1403
1404
=head2 firstname
1405
1406
  data_type: 'text'
1407
  is_nullable: 1
1408
1409
=head2 title
1410
1411
  data_type: 'mediumtext'
1412
  is_nullable: 1
1413
1414
=head2 othernames
1415
1416
  data_type: 'mediumtext'
1417
  is_nullable: 1
1418
1419
=head2 initials
1420
1421
  data_type: 'text'
1422
  is_nullable: 1
1423
1424
=head2 streetnumber
1425
1426
  data_type: 'varchar'
1427
  is_nullable: 1
1428
  size: 10
1429
1430
=head2 streettype
1431
1432
  data_type: 'varchar'
1433
  is_nullable: 1
1434
  size: 50
1435
1436
=head2 address
1437
1438
  data_type: 'mediumtext'
1439
  is_nullable: 0
1440
1441
=head2 address2
1442
1443
  data_type: 'text'
1444
  is_nullable: 1
1445
1446
=head2 city
1447
1448
  data_type: 'mediumtext'
1449
  is_nullable: 0
1450
1451
=head2 state
1452
1453
  data_type: 'text'
1454
  is_nullable: 1
1455
1456
=head2 zipcode
1457
1458
  data_type: 'varchar'
1459
  is_nullable: 1
1460
  size: 25
1461
1462
=head2 country
1463
1464
  data_type: 'text'
1465
  is_nullable: 1
1466
1467
=head2 email
1468
1469
  data_type: 'mediumtext'
1470
  is_nullable: 1
1471
1472
=head2 phone
1473
1474
  data_type: 'text'
1475
  is_nullable: 1
1476
1477
=head2 mobile
1478
1479
  data_type: 'varchar'
1480
  is_nullable: 1
1481
  size: 50
1482
1483
=head2 fax
1484
1485
  data_type: 'mediumtext'
1486
  is_nullable: 1
1487
1488
=head2 emailpro
1489
1490
  data_type: 'text'
1491
  is_nullable: 1
1492
1493
=head2 phonepro
1494
1495
  data_type: 'text'
1496
  is_nullable: 1
1497
1498
=head2 B_streetnumber
1499
1500
  accessor: 'b_streetnumber'
1501
  data_type: 'varchar'
1502
  is_nullable: 1
1503
  size: 10
1504
1505
=head2 B_streettype
1506
1507
  accessor: 'b_streettype'
1508
  data_type: 'varchar'
1509
  is_nullable: 1
1510
  size: 50
1511
1512
=head2 B_address
1513
1514
  accessor: 'b_address'
1515
  data_type: 'varchar'
1516
  is_nullable: 1
1517
  size: 100
1518
1519
=head2 B_address2
1520
1521
  accessor: 'b_address2'
1522
  data_type: 'text'
1523
  is_nullable: 1
1524
1525
=head2 B_city
1526
1527
  accessor: 'b_city'
1528
  data_type: 'mediumtext'
1529
  is_nullable: 1
1530
1531
=head2 B_state
1532
1533
  accessor: 'b_state'
1534
  data_type: 'text'
1535
  is_nullable: 1
1536
1537
=head2 B_zipcode
1538
1539
  accessor: 'b_zipcode'
1540
  data_type: 'varchar'
1541
  is_nullable: 1
1542
  size: 25
1543
1544
=head2 B_country
1545
1546
  accessor: 'b_country'
1547
  data_type: 'text'
1548
  is_nullable: 1
1549
1550
=head2 B_email
1551
1552
  accessor: 'b_email'
1553
  data_type: 'text'
1554
  is_nullable: 1
1555
1556
=head2 B_phone
1557
1558
  accessor: 'b_phone'
1559
  data_type: 'mediumtext'
1560
  is_nullable: 1
1561
1562
=head2 dateofbirth
1563
1564
  data_type: 'date'
1565
  datetime_undef_if_invalid: 1
1566
  is_nullable: 1
1567
1568
=head2 branchcode
1569
1570
  data_type: 'varchar'
1571
  default_value: (empty string)
1572
  is_foreign_key: 1
1573
  is_nullable: 0
1574
  size: 10
1575
1576
=head2 categorycode
1577
1578
  data_type: 'varchar'
1579
  default_value: (empty string)
1580
  is_foreign_key: 1
1581
  is_nullable: 0
1582
  size: 10
1583
1584
=head2 dateenrolled
1585
1586
  data_type: 'date'
1587
  datetime_undef_if_invalid: 1
1588
  is_nullable: 1
1589
1590
=head2 dateexpiry
1591
1592
  data_type: 'date'
1593
  datetime_undef_if_invalid: 1
1594
  is_nullable: 1
1595
1596
=head2 gonenoaddress
1597
1598
  data_type: 'tinyint'
1599
  is_nullable: 1
1600
1601
=head2 lost
1602
1603
  data_type: 'tinyint'
1604
  is_nullable: 1
1605
1606
=head2 debarred
1607
1608
  data_type: 'date'
1609
  datetime_undef_if_invalid: 1
1610
  is_nullable: 1
1611
1612
=head2 debarredcomment
1613
1614
  data_type: 'varchar'
1615
  is_nullable: 1
1616
  size: 255
1617
1618
=head2 contactname
1619
1620
  data_type: 'mediumtext'
1621
  is_nullable: 1
1622
1623
=head2 contactfirstname
1624
1625
  data_type: 'text'
1626
  is_nullable: 1
1627
1628
=head2 contacttitle
1629
1630
  data_type: 'text'
1631
  is_nullable: 1
1632
1633
=head2 guarantorid
1634
1635
  data_type: 'integer'
1636
  is_nullable: 1
1637
1638
=head2 borrowernotes
1639
1640
  data_type: 'mediumtext'
1641
  is_nullable: 1
1642
1643
=head2 relationship
1644
1645
  data_type: 'varchar'
1646
  is_nullable: 1
1647
  size: 100
1648
1649
=head2 sex
1650
1651
  data_type: 'varchar'
1652
  is_nullable: 1
1653
  size: 1
1654
1655
=head2 password
1656
1657
  data_type: 'varchar'
1658
  is_nullable: 1
1659
  size: 60
1660
1661
=head2 flags
1662
1663
  data_type: 'integer'
1664
  is_nullable: 1
1665
1666
=head2 userid
1667
1668
  data_type: 'varchar'
1669
  is_nullable: 1
1670
  size: 75
1671
1672
=head2 opacnote
1673
1674
  data_type: 'mediumtext'
1675
  is_nullable: 1
1676
1677
=head2 contactnote
1678
1679
  data_type: 'varchar'
1680
  is_nullable: 1
1681
  size: 255
1682
1683
=head2 sort1
1684
1685
  data_type: 'varchar'
1686
  is_nullable: 1
1687
  size: 80
1688
1689
=head2 sort2
1690
1691
  data_type: 'varchar'
1692
  is_nullable: 1
1693
  size: 80
1694
1695
=head2 altcontactfirstname
1696
1697
  data_type: 'varchar'
1698
  is_nullable: 1
1699
  size: 255
1700
1701
=head2 altcontactsurname
1702
1703
  data_type: 'varchar'
1704
  is_nullable: 1
1705
  size: 255
1706
1707
=head2 altcontactaddress1
1708
1709
  data_type: 'varchar'
1710
  is_nullable: 1
1711
  size: 255
1712
1713
=head2 altcontactaddress2
1714
1715
  data_type: 'varchar'
1716
  is_nullable: 1
1717
  size: 255
1718
1719
=head2 altcontactaddress3
1720
1721
  data_type: 'varchar'
1722
  is_nullable: 1
1723
  size: 255
1724
1725
=head2 altcontactstate
1726
1727
  data_type: 'text'
1728
  is_nullable: 1
1729
1730
=head2 altcontactzipcode
1731
1732
  data_type: 'varchar'
1733
  is_nullable: 1
1734
  size: 50
1735
1736
=head2 altcontactcountry
1737
1738
  data_type: 'text'
1739
  is_nullable: 1
1740
1741
=head2 altcontactphone
1742
1743
  data_type: 'varchar'
1744
  is_nullable: 1
1745
  size: 50
1746
1747
=head2 smsalertnumber
1748
1749
  data_type: 'varchar'
1750
  is_nullable: 1
1751
  size: 50
1752
1753
=head2 sms_provider_id
1754
1755
  data_type: 'integer'
1756
  is_foreign_key: 1
1757
  is_nullable: 1
1758
1759
=head2 privacy
1760
1761
  data_type: 'integer'
1762
  default_value: 1
1763
  is_nullable: 0
1764
1765
=head2 privacy_guarantor_checkouts
1766
1767
  data_type: 'tinyint'
1768
  default_value: 0
1769
  is_nullable: 0
1770
1771
=head2 checkprevcheckout
1772
1773
  data_type: 'varchar'
1774
  default_value: 'inherit'
1775
  is_nullable: 0
1776
  size: 7
1777
1778
=head2 updated_on
1779
1780
  data_type: 'timestamp'
1781
  datetime_undef_if_invalid: 1
1782
  default_value: current_timestamp
1783
  is_nullable: 0
1784
1785
=head2 lastseen
1786
1787
  data_type: 'datetime'
1788
  datetime_undef_if_invalid: 1
1789
  is_nullable: 1
1790
1791
=cut
1792
1793
__PACKAGE__->add_columns(
1794
  "borrowernumber",
1795
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
1796
  "cardnumber",
1797
  { data_type => "varchar", is_nullable => 1, size => 16 },
1798
  "surname",
1799
  { data_type => "mediumtext", is_nullable => 0 },
1800
  "firstname",
1801
  { data_type => "text", is_nullable => 1 },
1802
  "title",
1803
  { data_type => "mediumtext", is_nullable => 1 },
1804
  "othernames",
1805
  { data_type => "mediumtext", is_nullable => 1 },
1806
  "initials",
1807
  { data_type => "text", is_nullable => 1 },
1808
  "streetnumber",
1809
  { data_type => "varchar", is_nullable => 1, size => 10 },
1810
  "streettype",
1811
  { data_type => "varchar", is_nullable => 1, size => 50 },
1812
  "address",
1813
  { data_type => "mediumtext", is_nullable => 0 },
1814
  "address2",
1815
  { data_type => "text", is_nullable => 1 },
1816
  "city",
1817
  { data_type => "mediumtext", is_nullable => 0 },
1818
  "state",
1819
  { data_type => "text", is_nullable => 1 },
1820
  "zipcode",
1821
  { data_type => "varchar", is_nullable => 1, size => 25 },
1822
  "country",
1823
  { data_type => "text", is_nullable => 1 },
1824
  "email",
1825
  { data_type => "mediumtext", is_nullable => 1 },
1826
  "phone",
1827
  { data_type => "text", is_nullable => 1 },
1828
  "mobile",
1829
  { data_type => "varchar", is_nullable => 1, size => 50 },
1830
  "fax",
1831
  { data_type => "mediumtext", is_nullable => 1 },
1832
  "emailpro",
1833
  { data_type => "text", is_nullable => 1 },
1834
  "phonepro",
1835
  { data_type => "text", is_nullable => 1 },
1836
  "B_streetnumber",
1837
  {
1838
    accessor => "b_streetnumber",
1839
    data_type => "varchar",
1840
    is_nullable => 1,
1841
    size => 10,
1842
  },
1843
  "B_streettype",
1844
  {
1845
    accessor => "b_streettype",
1846
    data_type => "varchar",
1847
    is_nullable => 1,
1848
    size => 50,
1849
  },
1850
  "B_address",
1851
  {
1852
    accessor => "b_address",
1853
    data_type => "varchar",
1854
    is_nullable => 1,
1855
    size => 100,
1856
  },
1857
  "B_address2",
1858
  { accessor => "b_address2", data_type => "text", is_nullable => 1 },
1859
  "B_city",
1860
  { accessor => "b_city", data_type => "mediumtext", is_nullable => 1 },
1861
  "B_state",
1862
  { accessor => "b_state", data_type => "text", is_nullable => 1 },
1863
  "B_zipcode",
1864
  {
1865
    accessor => "b_zipcode",
1866
    data_type => "varchar",
1867
    is_nullable => 1,
1868
    size => 25,
1869
  },
1870
  "B_country",
1871
  { accessor => "b_country", data_type => "text", is_nullable => 1 },
1872
  "B_email",
1873
  { accessor => "b_email", data_type => "text", is_nullable => 1 },
1874
  "B_phone",
1875
  { accessor => "b_phone", data_type => "mediumtext", is_nullable => 1 },
1876
  "dateofbirth",
1877
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
1878
  "branchcode",
1879
  {
1880
    data_type => "varchar",
1881
    default_value => "",
1882
    is_foreign_key => 1,
1883
    is_nullable => 0,
1884
    size => 10,
1885
  },
1886
  "categorycode",
1887
  {
1888
    data_type => "varchar",
1889
    default_value => "",
1890
    is_foreign_key => 1,
1891
    is_nullable => 0,
1892
    size => 10,
1893
  },
1894
  "dateenrolled",
1895
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
1896
  "dateexpiry",
1897
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
1898
  "gonenoaddress",
1899
  { data_type => "tinyint", is_nullable => 1 },
1900
  "lost",
1901
  { data_type => "tinyint", is_nullable => 1 },
1902
  "debarred",
1903
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
1904
  "debarredcomment",
1905
  { data_type => "varchar", is_nullable => 1, size => 255 },
1906
  "contactname",
1907
  { data_type => "mediumtext", is_nullable => 1 },
1908
  "contactfirstname",
1909
  { data_type => "text", is_nullable => 1 },
1910
  "contacttitle",
1911
  { data_type => "text", is_nullable => 1 },
1912
  "guarantorid",
1913
  { data_type => "integer", is_nullable => 1 },
1914
  "borrowernotes",
1915
  { data_type => "mediumtext", is_nullable => 1 },
1916
  "relationship",
1917
  { data_type => "varchar", is_nullable => 1, size => 100 },
1918
  "sex",
1919
  { data_type => "varchar", is_nullable => 1, size => 1 },
1920
  "password",
1921
  { data_type => "varchar", is_nullable => 1, size => 60 },
1922
  "flags",
1923
  { data_type => "integer", is_nullable => 1 },
1924
  "userid",
1925
  { data_type => "varchar", is_nullable => 1, size => 75 },
1926
  "opacnote",
1927
  { data_type => "mediumtext", is_nullable => 1 },
1928
  "contactnote",
1929
  { data_type => "varchar", is_nullable => 1, size => 255 },
1930
  "sort1",
1931
  { data_type => "varchar", is_nullable => 1, size => 80 },
1932
  "sort2",
1933
  { data_type => "varchar", is_nullable => 1, size => 80 },
1934
  "altcontactfirstname",
1935
  { data_type => "varchar", is_nullable => 1, size => 255 },
1936
  "altcontactsurname",
1937
  { data_type => "varchar", is_nullable => 1, size => 255 },
1938
  "altcontactaddress1",
1939
  { data_type => "varchar", is_nullable => 1, size => 255 },
1940
  "altcontactaddress2",
1941
  { data_type => "varchar", is_nullable => 1, size => 255 },
1942
  "altcontactaddress3",
1943
  { data_type => "varchar", is_nullable => 1, size => 255 },
1944
  "altcontactstate",
1945
  { data_type => "text", is_nullable => 1 },
1946
  "altcontactzipcode",
1947
  { data_type => "varchar", is_nullable => 1, size => 50 },
1948
  "altcontactcountry",
1949
  { data_type => "text", is_nullable => 1 },
1950
  "altcontactphone",
1951
  { data_type => "varchar", is_nullable => 1, size => 50 },
1952
  "smsalertnumber",
1953
  { data_type => "varchar", is_nullable => 1, size => 50 },
1954
  "sms_provider_id",
1955
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
1956
  "privacy",
1957
  { data_type => "integer", default_value => 1, is_nullable => 0 },
1958
  "privacy_guarantor_checkouts",
1959
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
1960
  "checkprevcheckout",
1961
  {
1962
    data_type => "varchar",
1963
    default_value => "inherit",
1964
    is_nullable => 0,
1965
    size => 7,
1966
  },
1967
  "updated_on",
1968
  {
1969
    data_type => "timestamp",
1970
    datetime_undef_if_invalid => 1,
1971
    default_value => \"current_timestamp",
1972
    is_nullable => 0,
1973
  },
1974
  "lastseen",
1975
  {
1976
    data_type => "datetime",
1977
    datetime_undef_if_invalid => 1,
1978
    is_nullable => 1,
1979
  },
1980
);
1981
1982
=head1 PRIMARY KEY
1983
1984
=over 4
1985
1986
=item * L</borrowernumber>
1987
1988
=back
1989
1990
=cut
1991
1992
__PACKAGE__->set_primary_key("borrowernumber");
1993
1994
=head1 UNIQUE CONSTRAINTS
1995
1996
=head2 C<cardnumber>
1997
1998
=over 4
1999
2000
=item * L</cardnumber>
2001
2002
=back
2003
2004
=cut
2005
2006
__PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]);
2007
2008
=head2 C<userid>
2009
2010
=over 4
2011
2012
=item * L</userid>
2013
2014
=back
2015
2016
=cut
2017
2018
__PACKAGE__->add_unique_constraint("userid", ["userid"]);
2019
2020
=head1 RELATIONS
2021
2022
=head2 accountlines
2023
2024
Type: has_many
2025
2026
Related object: L<Koha::Schema::Result::Accountline>
2027
2028
=cut
2029
2030
__PACKAGE__->has_many(
2031
  "accountlines",
2032
  "Koha::Schema::Result::Accountline",
2033
  { "foreign.borrowernumber" => "self.borrowernumber" },
2034
  { cascade_copy => 0, cascade_delete => 0 },
2035
);
2036
2037
=head2 accountoffsets
2038
2039
Type: has_many
2040
2041
Related object: L<Koha::Schema::Result::Accountoffset>
2042
2043
=cut
2044
2045
__PACKAGE__->has_many(
2046
  "accountoffsets",
2047
  "Koha::Schema::Result::Accountoffset",
2048
  { "foreign.borrowernumber" => "self.borrowernumber" },
2049
  { cascade_copy => 0, cascade_delete => 0 },
2050
);
2051
2052
=head2 aqbasketusers
2053
2054
Type: has_many
2055
2056
Related object: L<Koha::Schema::Result::Aqbasketuser>
2057
2058
=cut
2059
2060
__PACKAGE__->has_many(
2061
  "aqbasketusers",
2062
  "Koha::Schema::Result::Aqbasketuser",
2063
  { "foreign.borrowernumber" => "self.borrowernumber" },
2064
  { cascade_copy => 0, cascade_delete => 0 },
2065
);
2066
2067
=head2 aqbudgetborrowers
2068
2069
Type: has_many
2070
2071
Related object: L<Koha::Schema::Result::Aqbudgetborrower>
2072
2073
=cut
2074
2075
__PACKAGE__->has_many(
2076
  "aqbudgetborrowers",
2077
  "Koha::Schema::Result::Aqbudgetborrower",
2078
  { "foreign.borrowernumber" => "self.borrowernumber" },
2079
  { cascade_copy => 0, cascade_delete => 0 },
2080
);
2081
2082
=head2 aqorder_users
2083
2084
Type: has_many
2085
2086
Related object: L<Koha::Schema::Result::AqorderUser>
2087
2088
=cut
2089
2090
__PACKAGE__->has_many(
2091
  "aqorder_users",
2092
  "Koha::Schema::Result::AqorderUser",
2093
  { "foreign.borrowernumber" => "self.borrowernumber" },
2094
  { cascade_copy => 0, cascade_delete => 0 },
2095
);
2096
2097
=head2 article_requests
2098
2099
Type: has_many
2100
2101
Related object: L<Koha::Schema::Result::ArticleRequest>
2102
2103
=cut
2104
2105
__PACKAGE__->has_many(
2106
  "article_requests",
2107
  "Koha::Schema::Result::ArticleRequest",
2108
  { "foreign.borrowernumber" => "self.borrowernumber" },
2109
  { cascade_copy => 0, cascade_delete => 0 },
2110
);
2111
2112
=head2 borrower_attributes
2113
2114
Type: has_many
2115
2116
Related object: L<Koha::Schema::Result::BorrowerAttribute>
2117
2118
=cut
2119
2120
__PACKAGE__->has_many(
2121
  "borrower_attributes",
2122
  "Koha::Schema::Result::BorrowerAttribute",
2123
  { "foreign.borrowernumber" => "self.borrowernumber" },
2124
  { cascade_copy => 0, cascade_delete => 0 },
2125
);
2126
2127
=head2 borrower_debarments
2128
2129
Type: has_many
2130
2131
Related object: L<Koha::Schema::Result::BorrowerDebarment>
2132
2133
=cut
2134
2135
__PACKAGE__->has_many(
2136
  "borrower_debarments",
2137
  "Koha::Schema::Result::BorrowerDebarment",
2138
  { "foreign.borrowernumber" => "self.borrowernumber" },
2139
  { cascade_copy => 0, cascade_delete => 0 },
2140
);
2141
2142
=head2 borrower_files
2143
2144
Type: has_many
2145
2146
Related object: L<Koha::Schema::Result::BorrowerFile>
2147
2148
=cut
2149
2150
__PACKAGE__->has_many(
2151
  "borrower_files",
2152
  "Koha::Schema::Result::BorrowerFile",
2153
  { "foreign.borrowernumber" => "self.borrowernumber" },
2154
  { cascade_copy => 0, cascade_delete => 0 },
2155
);
2156
2157
=head2 borrower_message_preferences
2158
2159
Type: has_many
2160
2161
Related object: L<Koha::Schema::Result::BorrowerMessagePreference>
2162
2163
=cut
2164
2165
__PACKAGE__->has_many(
2166
  "borrower_message_preferences",
2167
  "Koha::Schema::Result::BorrowerMessagePreference",
2168
  { "foreign.borrowernumber" => "self.borrowernumber" },
2169
  { cascade_copy => 0, cascade_delete => 0 },
2170
);
2171
2172
=head2 borrower_syncs
2173
2174
Type: has_many
2175
2176
Related object: L<Koha::Schema::Result::BorrowerSync>
2177
2178
=cut
2179
2180
__PACKAGE__->has_many(
2181
  "borrower_syncs",
2182
  "Koha::Schema::Result::BorrowerSync",
2183
  { "foreign.borrowernumber" => "self.borrowernumber" },
2184
  { cascade_copy => 0, cascade_delete => 0 },
2185
);
2186
2187
=head2 branchcode
2188
2189
Type: belongs_to
2190
2191
Related object: L<Koha::Schema::Result::Branch>
2192
2193
=cut
2194
2195
__PACKAGE__->belongs_to(
2196
  "branchcode",
2197
  "Koha::Schema::Result::Branch",
2198
  { branchcode => "branchcode" },
2199
  { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
2200
);
2201
2202
=head2 categorycode
2203
2204
Type: belongs_to
2205
2206
Related object: L<Koha::Schema::Result::Category>
2207
2208
=cut
2209
2210
__PACKAGE__->belongs_to(
2211
  "categorycode",
2212
  "Koha::Schema::Result::Category",
2213
  { categorycode => "categorycode" },
2214
  { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
2215
);
2216
2217
=head2 course_instructors
2218
2219
Type: has_many
2220
2221
Related object: L<Koha::Schema::Result::CourseInstructor>
2222
2223
=cut
2224
2225
__PACKAGE__->has_many(
2226
  "course_instructors",
2227
  "Koha::Schema::Result::CourseInstructor",
2228
  { "foreign.borrowernumber" => "self.borrowernumber" },
2229
  { cascade_copy => 0, cascade_delete => 0 },
2230
);
2231
2232
=head2 creator_batches
2233
2234
Type: has_many
2235
2236
Related object: L<Koha::Schema::Result::CreatorBatch>
2237
2238
=cut
2239
2240
__PACKAGE__->has_many(
2241
  "creator_batches",
2242
  "Koha::Schema::Result::CreatorBatch",
2243
  { "foreign.borrower_number" => "self.borrowernumber" },
2244
  { cascade_copy => 0, cascade_delete => 0 },
2245
);
2246
2247
=head2 discharges
2248
2249
Type: has_many
2250
2251
Related object: L<Koha::Schema::Result::Discharge>
2252
2253
=cut
2254
2255
__PACKAGE__->has_many(
2256
  "discharges",
2257
  "Koha::Schema::Result::Discharge",
2258
  { "foreign.borrower" => "self.borrowernumber" },
2259
  { cascade_copy => 0, cascade_delete => 0 },
2260
);
2261
2262
=head2 hold_fill_targets
2263
2264
Type: has_many
2265
2266
Related object: L<Koha::Schema::Result::HoldFillTarget>
2267
2268
=cut
2269
2270
__PACKAGE__->has_many(
2271
  "hold_fill_targets",
2272
  "Koha::Schema::Result::HoldFillTarget",
2273
  { "foreign.borrowernumber" => "self.borrowernumber" },
2274
  { cascade_copy => 0, cascade_delete => 0 },
2275
);
2276
2277
=head2 housebound_profile
2278
2279
Type: might_have
2280
2281
Related object: L<Koha::Schema::Result::HouseboundProfile>
2282
2283
=cut
2284
2285
__PACKAGE__->might_have(
2286
  "housebound_profile",
2287
  "Koha::Schema::Result::HouseboundProfile",
2288
  { "foreign.borrowernumber" => "self.borrowernumber" },
2289
  { cascade_copy => 0, cascade_delete => 0 },
2290
);
2291
2292
=head2 housebound_role
2293
2294
Type: might_have
2295
2296
Related object: L<Koha::Schema::Result::HouseboundRole>
2297
2298
=cut
2299
2300
__PACKAGE__->might_have(
2301
  "housebound_role",
2302
  "Koha::Schema::Result::HouseboundRole",
2303
  { "foreign.borrowernumber_id" => "self.borrowernumber" },
2304
  { cascade_copy => 0, cascade_delete => 0 },
2305
);
2306
2307
=head2 housebound_visit_chooser_brwnumbers
2308
2309
Type: has_many
2310
2311
Related object: L<Koha::Schema::Result::HouseboundVisit>
2312
2313
=cut
2314
2315
__PACKAGE__->has_many(
2316
  "housebound_visit_chooser_brwnumbers",
2317
  "Koha::Schema::Result::HouseboundVisit",
2318
  { "foreign.chooser_brwnumber" => "self.borrowernumber" },
2319
  { cascade_copy => 0, cascade_delete => 0 },
2320
);
2321
2322
=head2 housebound_visit_deliverer_brwnumbers
2323
2324
Type: has_many
2325
2326
Related object: L<Koha::Schema::Result::HouseboundVisit>
2327
2328
=cut
2329
2330
__PACKAGE__->has_many(
2331
  "housebound_visit_deliverer_brwnumbers",
2332
  "Koha::Schema::Result::HouseboundVisit",
2333
  { "foreign.deliverer_brwnumber" => "self.borrowernumber" },
2334
  { cascade_copy => 0, cascade_delete => 0 },
2335
);
2336
976
=head2 issues
2337
=head2 issues
977
2338
978
Type: has_many
2339
Type: has_many
Lines 1348-1350 sub koha_objects_class { Link Here
1348
}
2709
}
1349
2710
1350
1;
2711
1;
2712
# End of lines loaded from '/home/alex/src/koha/Koha/Schema/Result/Borrower.pm' 
2713
2714
__PACKAGE__->belongs_to(
2715
    "guarantor",
2716
    "Koha::Schema::Result::Borrower",
2717
    { borrowernumber => "guarantorid" },
2718
);
2719
2720
sub koha_objects_class {
2721
    'Koha::Patrons';
2722
}
2723
2724
1;
(-)a/Koha/Schema/Result/Branch.pm (-2 / +597 lines)
Lines 442-447 __PACKAGE__->has_many( Link Here
442
  { cascade_copy => 0, cascade_delete => 0 },
442
  { cascade_copy => 0, cascade_delete => 0 },
443
);
443
);
444
444
445
=head2 illrequests
446
447
Type: has_many
448
449
Related object: L<Koha::Schema::Result::Illrequest>
450
451
=cut
452
453
__PACKAGE__->has_many(
454
  "illrequests",
455
  "Koha::Schema::Result::Illrequest",
456
  { "foreign.branchcode" => "self.branchcode" },
457
  { cascade_copy => 0, cascade_delete => 0 },
458
);
459
460
=head2 items_holdingbranches
461
462
Type: has_many
463
464
Related object: L<Koha::Schema::Result::Item>
465
466
=cut
467
468
__PACKAGE__->has_many(
469
  "items_holdingbranches",
470
  "Koha::Schema::Result::Item",
471
  { "foreign.holdingbranch" => "self.branchcode" },
472
  { cascade_copy => 0, cascade_delete => 0 },
473
);
474
475
=head2 items_homebranches
476
477
Type: has_many
478
479
Related object: L<Koha::Schema::Result::Item>
480
481
=cut
482
483
__PACKAGE__->has_many(
484
  "items_homebranches",
485
  "Koha::Schema::Result::Item",
486
  { "foreign.homebranch" => "self.branchcode" },
487
  { cascade_copy => 0, cascade_delete => 0 },
488
);
489
490
=head2 opac_news
491
492
Type: has_many
493
494
Related object: L<Koha::Schema::Result::OpacNews>
495
496
=cut
497
498
__PACKAGE__->has_many(
499
  "opac_news",
500
  "Koha::Schema::Result::OpacNews",
501
  { "foreign.branchcode" => "self.branchcode" },
502
  { cascade_copy => 0, cascade_delete => 0 },
503
);
504
505
=head2 reserves
506
507
Type: has_many
508
509
Related object: L<Koha::Schema::Result::Reserve>
510
511
=cut
512
513
__PACKAGE__->has_many(
514
  "reserves",
515
  "Koha::Schema::Result::Reserve",
516
  { "foreign.branchcode" => "self.branchcode" },
517
  { cascade_copy => 0, cascade_delete => 0 },
518
);
519
520
=head2 transport_cost_frombranches
521
522
Type: has_many
523
524
Related object: L<Koha::Schema::Result::TransportCost>
525
526
=cut
527
528
__PACKAGE__->has_many(
529
  "transport_cost_frombranches",
530
  "Koha::Schema::Result::TransportCost",
531
  { "foreign.frombranch" => "self.branchcode" },
532
  { cascade_copy => 0, cascade_delete => 0 },
533
);
534
535
=head2 transport_cost_tobranches
536
537
Type: has_many
538
539
Related object: L<Koha::Schema::Result::TransportCost>
540
541
=cut
542
543
__PACKAGE__->has_many(
544
  "transport_cost_tobranches",
545
  "Koha::Schema::Result::TransportCost",
546
  { "foreign.tobranch" => "self.branchcode" },
547
  { cascade_copy => 0, cascade_delete => 0 },
548
);
549
550
=head2 categorycodes
551
552
Type: many_to_many
553
554
Composing rels: L</branchrelations> -> categorycode
555
556
=cut
557
558
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
559
560
561
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-02-03 16:55:44
562
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pWB4xcUOQAG7MrlZVbvwqw
563
# These lines were loaded from '/home/alex/src/koha/Koha/Schema/Result/Branch.pm' found in @INC.
564
# They are now part of the custom portion of this file
565
# for you to hand-edit.  If you do not either delete
566
# this section or remove that file from @INC, this section
567
# will be repeated redundantly when you re-create this
568
# file again via Loader!  See skip_load_external to disable
569
# this feature.
570
571
use utf8;
572
package Koha::Schema::Result::Branch;
573
574
# Created by DBIx::Class::Schema::Loader
575
# DO NOT MODIFY THE FIRST PART OF THIS FILE
576
577
=head1 NAME
578
579
Koha::Schema::Result::Branch
580
581
=cut
582
583
use strict;
584
use warnings;
585
586
use base 'DBIx::Class::Core';
587
588
=head1 TABLE: C<branches>
589
590
=cut
591
592
__PACKAGE__->table("branches");
593
594
=head1 ACCESSORS
595
596
=head2 branchcode
597
598
  data_type: 'varchar'
599
  default_value: (empty string)
600
  is_nullable: 0
601
  size: 10
602
603
=head2 branchname
604
605
  data_type: 'mediumtext'
606
  is_nullable: 0
607
608
=head2 branchaddress1
609
610
  data_type: 'mediumtext'
611
  is_nullable: 1
612
613
=head2 branchaddress2
614
615
  data_type: 'mediumtext'
616
  is_nullable: 1
617
618
=head2 branchaddress3
619
620
  data_type: 'mediumtext'
621
  is_nullable: 1
622
623
=head2 branchzip
624
625
  data_type: 'varchar'
626
  is_nullable: 1
627
  size: 25
628
629
=head2 branchcity
630
631
  data_type: 'mediumtext'
632
  is_nullable: 1
633
634
=head2 branchstate
635
636
  data_type: 'mediumtext'
637
  is_nullable: 1
638
639
=head2 branchcountry
640
641
  data_type: 'text'
642
  is_nullable: 1
643
644
=head2 branchphone
645
646
  data_type: 'mediumtext'
647
  is_nullable: 1
648
649
=head2 branchfax
650
651
  data_type: 'mediumtext'
652
  is_nullable: 1
653
654
=head2 branchemail
655
656
  data_type: 'mediumtext'
657
  is_nullable: 1
658
659
=head2 branchreplyto
660
661
  data_type: 'mediumtext'
662
  is_nullable: 1
663
664
=head2 branchreturnpath
665
666
  data_type: 'mediumtext'
667
  is_nullable: 1
668
669
=head2 branchurl
670
671
  data_type: 'mediumtext'
672
  is_nullable: 1
673
674
=head2 issuing
675
676
  data_type: 'tinyint'
677
  is_nullable: 1
678
679
=head2 branchip
680
681
  data_type: 'varchar'
682
  is_nullable: 1
683
  size: 15
684
685
=head2 branchprinter
686
687
  data_type: 'varchar'
688
  is_nullable: 1
689
  size: 100
690
691
=head2 branchnotes
692
693
  data_type: 'mediumtext'
694
  is_nullable: 1
695
696
=head2 opac_info
697
698
  data_type: 'text'
699
  is_nullable: 1
700
701
=cut
702
703
__PACKAGE__->add_columns(
704
  "branchcode",
705
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
706
  "branchname",
707
  { data_type => "mediumtext", is_nullable => 0 },
708
  "branchaddress1",
709
  { data_type => "mediumtext", is_nullable => 1 },
710
  "branchaddress2",
711
  { data_type => "mediumtext", is_nullable => 1 },
712
  "branchaddress3",
713
  { data_type => "mediumtext", is_nullable => 1 },
714
  "branchzip",
715
  { data_type => "varchar", is_nullable => 1, size => 25 },
716
  "branchcity",
717
  { data_type => "mediumtext", is_nullable => 1 },
718
  "branchstate",
719
  { data_type => "mediumtext", is_nullable => 1 },
720
  "branchcountry",
721
  { data_type => "text", is_nullable => 1 },
722
  "branchphone",
723
  { data_type => "mediumtext", is_nullable => 1 },
724
  "branchfax",
725
  { data_type => "mediumtext", is_nullable => 1 },
726
  "branchemail",
727
  { data_type => "mediumtext", is_nullable => 1 },
728
  "branchreplyto",
729
  { data_type => "mediumtext", is_nullable => 1 },
730
  "branchreturnpath",
731
  { data_type => "mediumtext", is_nullable => 1 },
732
  "branchurl",
733
  { data_type => "mediumtext", is_nullable => 1 },
734
  "issuing",
735
  { data_type => "tinyint", is_nullable => 1 },
736
  "branchip",
737
  { data_type => "varchar", is_nullable => 1, size => 15 },
738
  "branchprinter",
739
  { data_type => "varchar", is_nullable => 1, size => 100 },
740
  "branchnotes",
741
  { data_type => "mediumtext", is_nullable => 1 },
742
  "opac_info",
743
  { data_type => "text", is_nullable => 1 },
744
);
745
746
=head1 PRIMARY KEY
747
748
=over 4
749
750
=item * L</branchcode>
751
752
=back
753
754
=cut
755
756
__PACKAGE__->set_primary_key("branchcode");
757
758
=head1 RELATIONS
759
760
=head2 aqbaskets
761
762
Type: has_many
763
764
Related object: L<Koha::Schema::Result::Aqbasket>
765
766
=cut
767
768
__PACKAGE__->has_many(
769
  "aqbaskets",
770
  "Koha::Schema::Result::Aqbasket",
771
  { "foreign.branch" => "self.branchcode" },
772
  { cascade_copy => 0, cascade_delete => 0 },
773
);
774
775
=head2 article_requests
776
777
Type: has_many
778
779
Related object: L<Koha::Schema::Result::ArticleRequest>
780
781
=cut
782
783
__PACKAGE__->has_many(
784
  "article_requests",
785
  "Koha::Schema::Result::ArticleRequest",
786
  { "foreign.branchcode" => "self.branchcode" },
787
  { cascade_copy => 0, cascade_delete => 0 },
788
);
789
790
=head2 authorised_values_branches
791
792
Type: has_many
793
794
Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
795
796
=cut
797
798
__PACKAGE__->has_many(
799
  "authorised_values_branches",
800
  "Koha::Schema::Result::AuthorisedValuesBranch",
801
  { "foreign.branchcode" => "self.branchcode" },
802
  { cascade_copy => 0, cascade_delete => 0 },
803
);
804
805
=head2 borrower_attribute_types_branches
806
807
Type: has_many
808
809
Related object: L<Koha::Schema::Result::BorrowerAttributeTypesBranch>
810
811
=cut
812
813
__PACKAGE__->has_many(
814
  "borrower_attribute_types_branches",
815
  "Koha::Schema::Result::BorrowerAttributeTypesBranch",
816
  { "foreign.b_branchcode" => "self.branchcode" },
817
  { cascade_copy => 0, cascade_delete => 0 },
818
);
819
820
=head2 borrowers
821
822
Type: has_many
823
824
Related object: L<Koha::Schema::Result::Borrower>
825
826
=cut
827
828
__PACKAGE__->has_many(
829
  "borrowers",
830
  "Koha::Schema::Result::Borrower",
831
  { "foreign.branchcode" => "self.branchcode" },
832
  { cascade_copy => 0, cascade_delete => 0 },
833
);
834
835
=head2 branch_borrower_circ_rules
836
837
Type: has_many
838
839
Related object: L<Koha::Schema::Result::BranchBorrowerCircRule>
840
841
=cut
842
843
__PACKAGE__->has_many(
844
  "branch_borrower_circ_rules",
845
  "Koha::Schema::Result::BranchBorrowerCircRule",
846
  { "foreign.branchcode" => "self.branchcode" },
847
  { cascade_copy => 0, cascade_delete => 0 },
848
);
849
850
=head2 branch_item_rules
851
852
Type: has_many
853
854
Related object: L<Koha::Schema::Result::BranchItemRule>
855
856
=cut
857
858
__PACKAGE__->has_many(
859
  "branch_item_rules",
860
  "Koha::Schema::Result::BranchItemRule",
861
  { "foreign.branchcode" => "self.branchcode" },
862
  { cascade_copy => 0, cascade_delete => 0 },
863
);
864
865
=head2 branchrelations
866
867
Type: has_many
868
869
Related object: L<Koha::Schema::Result::Branchrelation>
870
871
=cut
872
873
__PACKAGE__->has_many(
874
  "branchrelations",
875
  "Koha::Schema::Result::Branchrelation",
876
  { "foreign.branchcode" => "self.branchcode" },
877
  { cascade_copy => 0, cascade_delete => 0 },
878
);
879
880
=head2 branchtransfers_frombranches
881
882
Type: has_many
883
884
Related object: L<Koha::Schema::Result::Branchtransfer>
885
886
=cut
887
888
__PACKAGE__->has_many(
889
  "branchtransfers_frombranches",
890
  "Koha::Schema::Result::Branchtransfer",
891
  { "foreign.frombranch" => "self.branchcode" },
892
  { cascade_copy => 0, cascade_delete => 0 },
893
);
894
895
=head2 branchtransfers_tobranches
896
897
Type: has_many
898
899
Related object: L<Koha::Schema::Result::Branchtransfer>
900
901
=cut
902
903
__PACKAGE__->has_many(
904
  "branchtransfers_tobranches",
905
  "Koha::Schema::Result::Branchtransfer",
906
  { "foreign.tobranch" => "self.branchcode" },
907
  { cascade_copy => 0, cascade_delete => 0 },
908
);
909
910
=head2 categories_branches
911
912
Type: has_many
913
914
Related object: L<Koha::Schema::Result::CategoriesBranch>
915
916
=cut
917
918
__PACKAGE__->has_many(
919
  "categories_branches",
920
  "Koha::Schema::Result::CategoriesBranch",
921
  { "foreign.branchcode" => "self.branchcode" },
922
  { cascade_copy => 0, cascade_delete => 0 },
923
);
924
925
=head2 collections
926
927
Type: has_many
928
929
Related object: L<Koha::Schema::Result::Collection>
930
931
=cut
932
933
__PACKAGE__->has_many(
934
  "collections",
935
  "Koha::Schema::Result::Collection",
936
  { "foreign.colBranchcode" => "self.branchcode" },
937
  { cascade_copy => 0, cascade_delete => 0 },
938
);
939
940
=head2 course_items
941
942
Type: has_many
943
944
Related object: L<Koha::Schema::Result::CourseItem>
945
946
=cut
947
948
__PACKAGE__->has_many(
949
  "course_items",
950
  "Koha::Schema::Result::CourseItem",
951
  { "foreign.holdingbranch" => "self.branchcode" },
952
  { cascade_copy => 0, cascade_delete => 0 },
953
);
954
955
=head2 creator_batches
956
957
Type: has_many
958
959
Related object: L<Koha::Schema::Result::CreatorBatch>
960
961
=cut
962
963
__PACKAGE__->has_many(
964
  "creator_batches",
965
  "Koha::Schema::Result::CreatorBatch",
966
  { "foreign.branch_code" => "self.branchcode" },
967
  { cascade_copy => 0, cascade_delete => 0 },
968
);
969
970
=head2 default_branch_circ_rule
971
972
Type: might_have
973
974
Related object: L<Koha::Schema::Result::DefaultBranchCircRule>
975
976
=cut
977
978
__PACKAGE__->might_have(
979
  "default_branch_circ_rule",
980
  "Koha::Schema::Result::DefaultBranchCircRule",
981
  { "foreign.branchcode" => "self.branchcode" },
982
  { cascade_copy => 0, cascade_delete => 0 },
983
);
984
985
=head2 edifact_eans
986
987
Type: has_many
988
989
Related object: L<Koha::Schema::Result::EdifactEan>
990
991
=cut
992
993
__PACKAGE__->has_many(
994
  "edifact_eans",
995
  "Koha::Schema::Result::EdifactEan",
996
  { "foreign.branchcode" => "self.branchcode" },
997
  { cascade_copy => 0, cascade_delete => 0 },
998
);
999
1000
=head2 hold_fill_targets
1001
1002
Type: has_many
1003
1004
Related object: L<Koha::Schema::Result::HoldFillTarget>
1005
1006
=cut
1007
1008
__PACKAGE__->has_many(
1009
  "hold_fill_targets",
1010
  "Koha::Schema::Result::HoldFillTarget",
1011
  { "foreign.source_branchcode" => "self.branchcode" },
1012
  { cascade_copy => 0, cascade_delete => 0 },
1013
);
1014
445
=head2 items_holdingbranches
1015
=head2 items_holdingbranches
446
1016
447
Type: has_many
1017
Type: has_many
Lines 502-507 __PACKAGE__->has_many( Link Here
502
  { cascade_copy => 0, cascade_delete => 0 },
1072
  { cascade_copy => 0, cascade_delete => 0 },
503
);
1073
);
504
1074
1075
=head2 stockrotationstages
1076
1077
Type: has_many
1078
1079
Related object: L<Koha::Schema::Result::Stockrotationstage>
1080
1081
=cut
1082
1083
__PACKAGE__->has_many(
1084
  "stockrotationstages",
1085
  "Koha::Schema::Result::Stockrotationstage",
1086
  { "foreign.branchcode_id" => "self.branchcode" },
1087
  { cascade_copy => 0, cascade_delete => 0 },
1088
);
1089
505
=head2 transport_cost_frombranches
1090
=head2 transport_cost_frombranches
506
1091
507
Type: has_many
1092
Type: has_many
Lines 543-550 Composing rels: L</branchrelations> -> categorycode Link Here
543
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
1128
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
544
1129
545
1130
546
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-24 13:56:21
1131
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-12-12 17:01:45
547
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/9YwsU+GXK+fzc6IX2Tj5g
1132
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ug0wv4pEEOJ8q8WuD+HQVA
1133
1134
1135
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1136
1137
sub koha_objects_class {
1138
    'Koha::Libraries';
1139
}
1140
1141
1;
1142
# End of lines loaded from '/home/alex/src/koha/Koha/Schema/Result/Branch.pm' 
548
1143
549
1144
550
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1145
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Illrequest.pm (+239 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::Illrequest;
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::Illrequest
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<illrequests>
19
20
=cut
21
22
__PACKAGE__->table("illrequests");
23
24
=head1 ACCESSORS
25
26
=head2 illrequest_id
27
28
  data_type: 'bigint'
29
  extra: {unsigned => 1}
30
  is_auto_increment: 1
31
  is_nullable: 0
32
33
=head2 borrowernumber
34
35
  data_type: 'integer'
36
  is_foreign_key: 1
37
  is_nullable: 1
38
39
=head2 biblio_id
40
41
  data_type: 'integer'
42
  is_nullable: 1
43
44
=head2 branchcode
45
46
  data_type: 'varchar'
47
  is_foreign_key: 1
48
  is_nullable: 0
49
  size: 50
50
51
=head2 status
52
53
  data_type: 'varchar'
54
  is_nullable: 1
55
  size: 50
56
57
=head2 placed
58
59
  data_type: 'date'
60
  datetime_undef_if_invalid: 1
61
  is_nullable: 1
62
63
=head2 replied
64
65
  data_type: 'date'
66
  datetime_undef_if_invalid: 1
67
  is_nullable: 1
68
69
=head2 updated
70
71
  data_type: 'timestamp'
72
  datetime_undef_if_invalid: 1
73
  default_value: current_timestamp
74
  is_nullable: 0
75
76
=head2 completed
77
78
  data_type: 'date'
79
  datetime_undef_if_invalid: 1
80
  is_nullable: 1
81
82
=head2 medium
83
84
  data_type: 'varchar'
85
  is_nullable: 1
86
  size: 30
87
88
=head2 accessurl
89
90
  data_type: 'varchar'
91
  is_nullable: 1
92
  size: 500
93
94
=head2 cost
95
96
  data_type: 'varchar'
97
  is_nullable: 1
98
  size: 20
99
100
=head2 notesopac
101
102
  data_type: 'text'
103
  is_nullable: 1
104
105
=head2 notesstaff
106
107
  data_type: 'text'
108
  is_nullable: 1
109
110
=head2 orderid
111
112
  data_type: 'varchar'
113
  is_nullable: 1
114
  size: 50
115
116
=head2 backend
117
118
  data_type: 'varchar'
119
  is_nullable: 1
120
  size: 20
121
122
=cut
123
124
__PACKAGE__->add_columns(
125
  "illrequest_id",
126
  {
127
    data_type => "bigint",
128
    extra => { unsigned => 1 },
129
    is_auto_increment => 1,
130
    is_nullable => 0,
131
  },
132
  "borrowernumber",
133
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
134
  "biblio_id",
135
  { data_type => "integer", is_nullable => 1 },
136
  "branchcode",
137
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 50 },
138
  "status",
139
  { data_type => "varchar", is_nullable => 1, size => 50 },
140
  "placed",
141
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
142
  "replied",
143
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
144
  "updated",
145
  {
146
    data_type => "timestamp",
147
    datetime_undef_if_invalid => 1,
148
    default_value => \"current_timestamp",
149
    is_nullable => 0,
150
  },
151
  "completed",
152
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
153
  "medium",
154
  { data_type => "varchar", is_nullable => 1, size => 30 },
155
  "accessurl",
156
  { data_type => "varchar", is_nullable => 1, size => 500 },
157
  "cost",
158
  { data_type => "varchar", is_nullable => 1, size => 20 },
159
  "notesopac",
160
  { data_type => "text", is_nullable => 1 },
161
  "notesstaff",
162
  { data_type => "text", is_nullable => 1 },
163
  "orderid",
164
  { data_type => "varchar", is_nullable => 1, size => 50 },
165
  "backend",
166
  { data_type => "varchar", is_nullable => 1, size => 20 },
167
);
168
169
=head1 PRIMARY KEY
170
171
=over 4
172
173
=item * L</illrequest_id>
174
175
=back
176
177
=cut
178
179
__PACKAGE__->set_primary_key("illrequest_id");
180
181
=head1 RELATIONS
182
183
=head2 borrowernumber
184
185
Type: belongs_to
186
187
Related object: L<Koha::Schema::Result::Borrower>
188
189
=cut
190
191
__PACKAGE__->belongs_to(
192
  "borrowernumber",
193
  "Koha::Schema::Result::Borrower",
194
  { borrowernumber => "borrowernumber" },
195
  {
196
    is_deferrable => 1,
197
    join_type     => "LEFT",
198
    on_delete     => "CASCADE",
199
    on_update     => "CASCADE",
200
  },
201
);
202
203
=head2 branchcode
204
205
Type: belongs_to
206
207
Related object: L<Koha::Schema::Result::Branch>
208
209
=cut
210
211
__PACKAGE__->belongs_to(
212
  "branchcode",
213
  "Koha::Schema::Result::Branch",
214
  { branchcode => "branchcode" },
215
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
216
);
217
218
=head2 illrequestattributes
219
220
Type: has_many
221
222
Related object: L<Koha::Schema::Result::Illrequestattribute>
223
224
=cut
225
226
__PACKAGE__->has_many(
227
  "illrequestattributes",
228
  "Koha::Schema::Result::Illrequestattribute",
229
  { "foreign.illrequest_id" => "self.illrequest_id" },
230
  { cascade_copy => 0, cascade_delete => 0 },
231
);
232
233
234
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-02-03 16:31:16
235
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Vb/fWCE2riLlSNJPS+KL7w
236
237
238
# You can replace this text with custom code or comments, and it will be preserved on regeneration
239
1;
(-)a/Koha/Schema/Result/Illrequestattribute.pm (-1 / +97 lines)
Line 0 Link Here
0
- 
1
use utf8;
2
package Koha::Schema::Result::Illrequestattribute;
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::Illrequestattribute
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<illrequestattributes>
19
20
=cut
21
22
__PACKAGE__->table("illrequestattributes");
23
24
=head1 ACCESSORS
25
26
=head2 illrequest_id
27
28
  data_type: 'bigint'
29
  extra: {unsigned => 1}
30
  is_foreign_key: 1
31
  is_nullable: 0
32
33
=head2 type
34
35
  data_type: 'varchar'
36
  is_nullable: 0
37
  size: 200
38
39
=head2 value
40
41
  data_type: 'text'
42
  is_nullable: 0
43
44
=cut
45
46
__PACKAGE__->add_columns(
47
  "illrequest_id",
48
  {
49
    data_type => "bigint",
50
    extra => { unsigned => 1 },
51
    is_foreign_key => 1,
52
    is_nullable => 0,
53
  },
54
  "type",
55
  { data_type => "varchar", is_nullable => 0, size => 200 },
56
  "value",
57
  { data_type => "text", is_nullable => 0 },
58
);
59
60
=head1 PRIMARY KEY
61
62
=over 4
63
64
=item * L</illrequest_id>
65
66
=item * L</type>
67
68
=back
69
70
=cut
71
72
__PACKAGE__->set_primary_key("illrequest_id", "type");
73
74
=head1 RELATIONS
75
76
=head2 illrequest
77
78
Type: belongs_to
79
80
Related object: L<Koha::Schema::Result::Illrequest>
81
82
=cut
83
84
__PACKAGE__->belongs_to(
85
  "illrequest",
86
  "Koha::Schema::Result::Illrequest",
87
  { illrequest_id => "illrequest_id" },
88
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
89
);
90
91
92
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-02-03 16:31:16
93
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2QDst/4XUeffLXHbVlOUVg
94
95
96
# You can replace this text with custom code or comments, and it will be preserved on regeneration
97
1;

Return to bug 7317