Lines 23-127
__PACKAGE__->table("subscriptionroutinglist");
Link Here
|
23 |
|
23 |
|
24 |
=head1 ACCESSORS |
24 |
=head1 ACCESSORS |
25 |
|
25 |
|
26 |
=head2 routingid |
26 |
=head2 routinglistid |
27 |
|
27 |
|
28 |
data_type: 'integer' |
28 |
data_type: 'integer' |
29 |
is_auto_increment: 1 |
29 |
is_auto_increment: 1 |
30 |
is_nullable: 0 |
30 |
is_nullable: 0 |
31 |
|
31 |
|
32 |
=head2 borrowernumber |
32 |
=head2 subscriptionid |
33 |
|
33 |
|
34 |
data_type: 'integer' |
34 |
data_type: 'integer' |
35 |
is_foreign_key: 1 |
35 |
is_foreign_key: 1 |
36 |
is_nullable: 0 |
36 |
is_nullable: 0 |
37 |
|
37 |
|
38 |
=head2 ranking |
38 |
=head2 title |
39 |
|
39 |
|
40 |
data_type: 'integer' |
40 |
data_type: 'varchar' |
41 |
is_nullable: 1 |
41 |
is_nullable: 0 |
|
|
42 |
size: 256 |
42 |
|
43 |
|
43 |
=head2 subscriptionid |
44 |
=head2 notes |
44 |
|
45 |
|
45 |
data_type: 'integer' |
46 |
data_type: 'text' |
46 |
is_foreign_key: 1 |
47 |
is_nullable: 1 |
47 |
is_nullable: 0 |
|
|
48 |
|
48 |
|
49 |
=cut |
49 |
=cut |
50 |
|
50 |
|
51 |
__PACKAGE__->add_columns( |
51 |
__PACKAGE__->add_columns( |
52 |
"routingid", |
52 |
"routinglistid", |
53 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
53 |
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, |
54 |
"borrowernumber", |
|
|
55 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
56 |
"ranking", |
57 |
{ data_type => "integer", is_nullable => 1 }, |
58 |
"subscriptionid", |
54 |
"subscriptionid", |
59 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
55 |
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, |
|
|
56 |
"title", |
57 |
{ data_type => "varchar", is_nullable => 0, size => 256 }, |
58 |
"notes", |
59 |
{ data_type => "text", is_nullable => 1 }, |
60 |
); |
60 |
); |
61 |
|
61 |
|
62 |
=head1 PRIMARY KEY |
62 |
=head1 PRIMARY KEY |
63 |
|
63 |
|
64 |
=over 4 |
64 |
=over 4 |
65 |
|
65 |
|
66 |
=item * L</routingid> |
66 |
=item * L</routinglistid> |
67 |
|
67 |
|
68 |
=back |
68 |
=back |
69 |
|
69 |
|
70 |
=cut |
70 |
=cut |
71 |
|
71 |
|
72 |
__PACKAGE__->set_primary_key("routingid"); |
72 |
__PACKAGE__->set_primary_key("routinglistid"); |
73 |
|
|
|
74 |
=head1 UNIQUE CONSTRAINTS |
75 |
|
76 |
=head2 C<subscriptionid> |
77 |
|
78 |
=over 4 |
79 |
|
80 |
=item * L</subscriptionid> |
81 |
|
82 |
=item * L</borrowernumber> |
83 |
|
84 |
=back |
85 |
|
86 |
=cut |
87 |
|
88 |
__PACKAGE__->add_unique_constraint("subscriptionid", ["subscriptionid", "borrowernumber"]); |
89 |
|
73 |
|
90 |
=head1 RELATIONS |
74 |
=head1 RELATIONS |
91 |
|
75 |
|
92 |
=head2 borrowernumber |
76 |
=head2 subscriptionid |
93 |
|
77 |
|
94 |
Type: belongs_to |
78 |
Type: belongs_to |
95 |
|
79 |
|
96 |
Related object: L<Koha::Schema::Result::Borrower> |
80 |
Related object: L<Koha::Schema::Result::Subscription> |
97 |
|
81 |
|
98 |
=cut |
82 |
=cut |
99 |
|
83 |
|
100 |
__PACKAGE__->belongs_to( |
84 |
__PACKAGE__->belongs_to( |
101 |
"borrowernumber", |
85 |
"subscriptionid", |
102 |
"Koha::Schema::Result::Borrower", |
86 |
"Koha::Schema::Result::Subscription", |
103 |
{ borrowernumber => "borrowernumber" }, |
87 |
{ subscriptionid => "subscriptionid" }, |
104 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
88 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" }, |
105 |
); |
89 |
); |
106 |
|
90 |
|
107 |
=head2 subscriptionid |
91 |
=head2 subscriptionroutings |
108 |
|
92 |
|
109 |
Type: belongs_to |
93 |
Type: has_many |
110 |
|
94 |
|
111 |
Related object: L<Koha::Schema::Result::Subscription> |
95 |
Related object: L<Koha::Schema::Result::Subscriptionrouting> |
112 |
|
96 |
|
113 |
=cut |
97 |
=cut |
114 |
|
98 |
|
115 |
__PACKAGE__->belongs_to( |
99 |
__PACKAGE__->has_many( |
116 |
"subscriptionid", |
100 |
"subscriptionroutings", |
117 |
"Koha::Schema::Result::Subscription", |
101 |
"Koha::Schema::Result::Subscriptionrouting", |
118 |
{ subscriptionid => "subscriptionid" }, |
102 |
{ "foreign.routinglistid" => "self.routinglistid" }, |
119 |
{ is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, |
103 |
{ cascade_copy => 0, cascade_delete => 0 }, |
120 |
); |
104 |
); |
121 |
|
105 |
|
122 |
|
106 |
|
123 |
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 |
107 |
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 |
124 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AK595c56vgTa7ZjwZjberw |
108 |
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ybxwm+MNY+0Z8txgjjIahw |
125 |
|
109 |
|
126 |
sub koha_object_class { |
110 |
sub koha_object_class { |
127 |
'Koha::Subscription::Routinglist'; |
111 |
'Koha::Subscription::Routinglist'; |