Bug 20434: Update UNIMARC framework - auth (SAUTTIT)
[koha.git] / Koha / Schema / Result / PatronConsent.pm
blobbf0d6e15105a1265b2a10be5e2ec867b50076d02
1 use utf8;
2 package Koha::Schema::Result::PatronConsent;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::PatronConsent
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<patron_consent>
20 =cut
22 __PACKAGE__->table("patron_consent");
24 =head1 ACCESSORS
26 =head2 id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 borrowernumber
34 data_type: 'integer'
35 is_foreign_key: 1
36 is_nullable: 0
38 =head2 type
40 data_type: 'enum'
41 extra: {list => ["GDPR_PROCESSING"]}
42 is_nullable: 1
44 =head2 given_on
46 data_type: 'datetime'
47 datetime_undef_if_invalid: 1
48 is_nullable: 1
50 =head2 refused_on
52 data_type: 'datetime'
53 datetime_undef_if_invalid: 1
54 is_nullable: 1
56 =cut
58 __PACKAGE__->add_columns(
59 "id",
60 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
61 "borrowernumber",
62 { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
63 "type",
65 data_type => "enum",
66 extra => { list => ["GDPR_PROCESSING"] },
67 is_nullable => 1,
69 "given_on",
71 data_type => "datetime",
72 datetime_undef_if_invalid => 1,
73 is_nullable => 1,
75 "refused_on",
77 data_type => "datetime",
78 datetime_undef_if_invalid => 1,
79 is_nullable => 1,
83 =head1 PRIMARY KEY
85 =over 4
87 =item * L</id>
89 =back
91 =cut
93 __PACKAGE__->set_primary_key("id");
95 =head1 RELATIONS
97 =head2 borrowernumber
99 Type: belongs_to
101 Related object: L<Koha::Schema::Result::Borrower>
103 =cut
105 __PACKAGE__->belongs_to(
106 "borrowernumber",
107 "Koha::Schema::Result::Borrower",
108 { borrowernumber => "borrowernumber" },
109 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
113 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-09-20 13:00:20
114 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:as3b13eS31zkIPr9uxP7+A
116 sub koha_object_class {
117 'Koha::Patron::Consent';
119 sub koha_objects_class {
120 'Koha::Patron::Consents';