Bug 30755: Remove auto_too_soon from error count
[koha.git] / Koha / Schema / Result / PatronConsent.pm
1 use utf8;
2 package Koha::Schema::Result::PatronConsent;
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::PatronConsent
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<patron_consent>
19
20 =cut
21
22 __PACKAGE__->table("patron_consent");
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 type
39
40   data_type: 'enum'
41   extra: {list => ["GDPR_PROCESSING"]}
42   is_nullable: 1
43
44 allows for future extension
45
46 =head2 given_on
47
48   data_type: 'datetime'
49   datetime_undef_if_invalid: 1
50   is_nullable: 1
51
52 =head2 refused_on
53
54   data_type: 'datetime'
55   datetime_undef_if_invalid: 1
56   is_nullable: 1
57
58 =cut
59
60 __PACKAGE__->add_columns(
61   "id",
62   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
63   "borrowernumber",
64   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
65   "type",
66   {
67     data_type => "enum",
68     extra => { list => ["GDPR_PROCESSING"] },
69     is_nullable => 1,
70   },
71   "given_on",
72   {
73     data_type => "datetime",
74     datetime_undef_if_invalid => 1,
75     is_nullable => 1,
76   },
77   "refused_on",
78   {
79     data_type => "datetime",
80     datetime_undef_if_invalid => 1,
81     is_nullable => 1,
82   },
83 );
84
85 =head1 PRIMARY KEY
86
87 =over 4
88
89 =item * L</id>
90
91 =back
92
93 =cut
94
95 __PACKAGE__->set_primary_key("id");
96
97 =head1 RELATIONS
98
99 =head2 borrowernumber
100
101 Type: belongs_to
102
103 Related object: L<Koha::Schema::Result::Borrower>
104
105 =cut
106
107 __PACKAGE__->belongs_to(
108   "borrowernumber",
109   "Koha::Schema::Result::Borrower",
110   { borrowernumber => "borrowernumber" },
111   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
112 );
113
114
115 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
116 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Rkn/K2jtHPFkGoG4QCmLsw
117
118 sub koha_object_class {
119     'Koha::Patron::Consent';
120 }
121 sub koha_objects_class {
122     'Koha::Patron::Consents';
123 }
124
125 1;