2c50c9a2023057e423c46456be597c44108c27af
[koha-equinox.git] / Koha / Schema / Result / HouseboundProfile.pm
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: 'mediumtext'
35   is_nullable: 0
36
37 =head2 frequency
38
39   data_type: 'mediumtext'
40   is_nullable: 0
41
42 =head2 fav_itemtypes
43
44   data_type: 'mediumtext'
45   is_nullable: 1
46
47 =head2 fav_subjects
48
49   data_type: 'mediumtext'
50   is_nullable: 1
51
52 =head2 fav_authors
53
54   data_type: 'mediumtext'
55   is_nullable: 1
56
57 =head2 referral
58
59   data_type: 'mediumtext'
60   is_nullable: 1
61
62 =head2 notes
63
64   data_type: 'mediumtext'
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 => "mediumtext", is_nullable => 0 },
74   "frequency",
75   { data_type => "mediumtext", is_nullable => 0 },
76   "fav_itemtypes",
77   { data_type => "mediumtext", is_nullable => 1 },
78   "fav_subjects",
79   { data_type => "mediumtext", is_nullable => 1 },
80   "fav_authors",
81   { data_type => "mediumtext", is_nullable => 1 },
82   "referral",
83   { data_type => "mediumtext", is_nullable => 1 },
84   "notes",
85   { data_type => "mediumtext", 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 @ 2018-02-16 17:54:53
134 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ESpGqu3oX9qad3elnDvOiw
135
136
137 # You can replace this text with custom code or comments, and it will be preserved on regeneration
138 1;