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

(-)a/Koha/Schema/Result/HouseboundProfile.pm (+138 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::HouseboundProfile;
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::HouseboundProfile
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<housebound_profile>
19
20
=cut
21
22
__PACKAGE__->table("housebound_profile");
23
24
=head1 ACCESSORS
25
26
=head2 borrowernumber
27
28
  data_type: 'integer'
29
  is_foreign_key: 1
30
  is_nullable: 0
31
32
=head2 day
33
34
  data_type: 'text'
35
  is_nullable: 0
36
37
=head2 frequency
38
39
  data_type: 'text'
40
  is_nullable: 0
41
42
=head2 fav_itemtypes
43
44
  data_type: 'text'
45
  is_nullable: 1
46
47
=head2 fav_subjects
48
49
  data_type: 'text'
50
  is_nullable: 1
51
52
=head2 fav_authors
53
54
  data_type: 'text'
55
  is_nullable: 1
56
57
=head2 referral
58
59
  data_type: 'text'
60
  is_nullable: 1
61
62
=head2 notes
63
64
  data_type: 'text'
65
  is_nullable: 1
66
67
=cut
68
69
__PACKAGE__->add_columns(
70
  "borrowernumber",
71
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
72
  "day",
73
  { data_type => "text", is_nullable => 0 },
74
  "frequency",
75
  { data_type => "text", is_nullable => 0 },
76
  "fav_itemtypes",
77
  { data_type => "text", is_nullable => 1 },
78
  "fav_subjects",
79
  { data_type => "text", is_nullable => 1 },
80
  "fav_authors",
81
  { data_type => "text", is_nullable => 1 },
82
  "referral",
83
  { data_type => "text", is_nullable => 1 },
84
  "notes",
85
  { data_type => "text", is_nullable => 1 },
86
);
87
88
=head1 PRIMARY KEY
89
90
=over 4
91
92
=item * L</borrowernumber>
93
94
=back
95
96
=cut
97
98
__PACKAGE__->set_primary_key("borrowernumber");
99
100
=head1 RELATIONS
101
102
=head2 borrowernumber
103
104
Type: belongs_to
105
106
Related object: L<Koha::Schema::Result::Borrower>
107
108
=cut
109
110
__PACKAGE__->belongs_to(
111
  "borrowernumber",
112
  "Koha::Schema::Result::Borrower",
113
  { borrowernumber => "borrowernumber" },
114
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
115
);
116
117
=head2 housebound_visits
118
119
Type: has_many
120
121
Related object: L<Koha::Schema::Result::HouseboundVisit>
122
123
=cut
124
125
__PACKAGE__->has_many(
126
  "housebound_visits",
127
  "Koha::Schema::Result::HouseboundVisit",
128
  { "foreign.borrowernumber" => "self.borrowernumber" },
129
  { cascade_copy => 0, cascade_delete => 0 },
130
);
131
132
133
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-04-25 13:21:23
134
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kY+BhDo9g/YCShkmFUVDYA
135
136
137
# You can replace this text with custom code or comments, and it will be preserved on regeneration
138
1;
(-)a/Koha/Schema/Result/HouseboundVisit.pm (-1 / +154 lines)
Line 0 Link Here
0
- 
1
use utf8;
2
package Koha::Schema::Result::HouseboundVisit;
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::HouseboundVisit
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<housebound_visit>
19
20
=cut
21
22
__PACKAGE__->table("housebound_visit");
23
24
=head1 ACCESSORS
25
26
=head2 id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 borrowernumber
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 0
37
38
=head2 appointment_date
39
40
  data_type: 'date'
41
  datetime_undef_if_invalid: 1
42
  is_nullable: 1
43
44
=head2 day_segment
45
46
  data_type: 'varchar'
47
  is_nullable: 1
48
  size: 10
49
50
=head2 chooser_brwnumber
51
52
  data_type: 'integer'
53
  is_foreign_key: 1
54
  is_nullable: 1
55
56
=head2 deliverer_brwnumber
57
58
  data_type: 'integer'
59
  is_foreign_key: 1
60
  is_nullable: 1
61
62
=cut
63
64
__PACKAGE__->add_columns(
65
  "id",
66
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
67
  "borrowernumber",
68
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
69
  "appointment_date",
70
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
71
  "day_segment",
72
  { data_type => "varchar", is_nullable => 1, size => 10 },
73
  "chooser_brwnumber",
74
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
75
  "deliverer_brwnumber",
76
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
77
);
78
79
=head1 PRIMARY KEY
80
81
=over 4
82
83
=item * L</id>
84
85
=back
86
87
=cut
88
89
__PACKAGE__->set_primary_key("id");
90
91
=head1 RELATIONS
92
93
=head2 borrowernumber
94
95
Type: belongs_to
96
97
Related object: L<Koha::Schema::Result::HouseboundProfile>
98
99
=cut
100
101
__PACKAGE__->belongs_to(
102
  "borrowernumber",
103
  "Koha::Schema::Result::HouseboundProfile",
104
  { borrowernumber => "borrowernumber" },
105
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
106
);
107
108
=head2 chooser_brwnumber
109
110
Type: belongs_to
111
112
Related object: L<Koha::Schema::Result::Borrower>
113
114
=cut
115
116
__PACKAGE__->belongs_to(
117
  "chooser_brwnumber",
118
  "Koha::Schema::Result::Borrower",
119
  { borrowernumber => "chooser_brwnumber" },
120
  {
121
    is_deferrable => 1,
122
    join_type     => "LEFT",
123
    on_delete     => "CASCADE",
124
    on_update     => "CASCADE",
125
  },
126
);
127
128
=head2 deliverer_brwnumber
129
130
Type: belongs_to
131
132
Related object: L<Koha::Schema::Result::Borrower>
133
134
=cut
135
136
__PACKAGE__->belongs_to(
137
  "deliverer_brwnumber",
138
  "Koha::Schema::Result::Borrower",
139
  { borrowernumber => "deliverer_brwnumber" },
140
  {
141
    is_deferrable => 1,
142
    join_type     => "LEFT",
143
    on_delete     => "CASCADE",
144
    on_update     => "CASCADE",
145
  },
146
);
147
148
149
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-04-25 13:21:23
150
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5zyc7l2BtF5cgpZeKbJNZg
151
152
153
# You can replace this text with custom code or comments, and it will be preserved on regeneration
154
1;

Return to bug 5670