Bug 24151: DBIC changes
[koha.git] / Koha / Schema / Result / PseudonymizedBorrowerAttribute.pm
1 use utf8;
2 package Koha::Schema::Result::PseudonymizedBorrowerAttribute;
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::PseudonymizedBorrowerAttribute
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<pseudonymized_borrower_attributes>
19
20 =cut
21
22 __PACKAGE__->table("pseudonymized_borrower_attributes");
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 transaction_id
33
34   data_type: 'integer'
35   is_foreign_key: 1
36   is_nullable: 0
37
38 =head2 code
39
40   data_type: 'varchar'
41   is_foreign_key: 1
42   is_nullable: 0
43   size: 10
44
45 =head2 attribute
46
47   data_type: 'varchar'
48   is_nullable: 1
49   size: 255
50
51 =cut
52
53 __PACKAGE__->add_columns(
54   "id",
55   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
56   "transaction_id",
57   { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
58   "code",
59   { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
60   "attribute",
61   { data_type => "varchar", is_nullable => 1, size => 255 },
62 );
63
64 =head1 PRIMARY KEY
65
66 =over 4
67
68 =item * L</id>
69
70 =back
71
72 =cut
73
74 __PACKAGE__->set_primary_key("id");
75
76 =head1 RELATIONS
77
78 =head2 code
79
80 Type: belongs_to
81
82 Related object: L<Koha::Schema::Result::BorrowerAttributeType>
83
84 =cut
85
86 __PACKAGE__->belongs_to(
87   "code",
88   "Koha::Schema::Result::BorrowerAttributeType",
89   { code => "code" },
90   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
91 );
92
93 =head2 transaction
94
95 Type: belongs_to
96
97 Related object: L<Koha::Schema::Result::PseudonymizedTransaction>
98
99 =cut
100
101 __PACKAGE__->belongs_to(
102   "transaction",
103   "Koha::Schema::Result::PseudonymizedTransaction",
104   { id => "transaction_id" },
105   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
106 );
107
108
109 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-01-11 17:12:17
110 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:q6CTb8kq83p1bEM+ilfAww
111
112
113 # You can replace this text with custom code or comments, and it will be preserved on regeneration
114 1;