Bug 20434: Update UNIMARC framework - auth (SAUTTIT)
[koha.git] / Koha / Schema / Result / Review.pm
blob6c628b41c23802cbdcd647b32c18d22ec78c2a4b
1 use utf8;
2 package Koha::Schema::Result::Review;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Review
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<reviews>
20 =cut
22 __PACKAGE__->table("reviews");
24 =head1 ACCESSORS
26 =head2 reviewid
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: 1
38 =head2 biblionumber
40 data_type: 'integer'
41 is_foreign_key: 1
42 is_nullable: 1
44 =head2 review
46 data_type: 'mediumtext'
47 is_nullable: 1
49 =head2 approved
51 data_type: 'tinyint'
52 default_value: 0
53 is_nullable: 1
55 =head2 datereviewed
57 data_type: 'datetime'
58 datetime_undef_if_invalid: 1
59 is_nullable: 1
61 =cut
63 __PACKAGE__->add_columns(
64 "reviewid",
65 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
66 "borrowernumber",
67 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
68 "biblionumber",
69 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
70 "review",
71 { data_type => "mediumtext", is_nullable => 1 },
72 "approved",
73 { data_type => "tinyint", default_value => 0, is_nullable => 1 },
74 "datereviewed",
76 data_type => "datetime",
77 datetime_undef_if_invalid => 1,
78 is_nullable => 1,
82 =head1 PRIMARY KEY
84 =over 4
86 =item * L</reviewid>
88 =back
90 =cut
92 __PACKAGE__->set_primary_key("reviewid");
94 =head1 RELATIONS
96 =head2 biblionumber
98 Type: belongs_to
100 Related object: L<Koha::Schema::Result::Biblio>
102 =cut
104 __PACKAGE__->belongs_to(
105 "biblionumber",
106 "Koha::Schema::Result::Biblio",
107 { biblionumber => "biblionumber" },
109 is_deferrable => 1,
110 join_type => "LEFT",
111 on_delete => "CASCADE",
112 on_update => "CASCADE",
116 =head2 borrowernumber
118 Type: belongs_to
120 Related object: L<Koha::Schema::Result::Borrower>
122 =cut
124 __PACKAGE__->belongs_to(
125 "borrowernumber",
126 "Koha::Schema::Result::Borrower",
127 { borrowernumber => "borrowernumber" },
129 is_deferrable => 1,
130 join_type => "LEFT",
131 on_delete => "SET NULL",
132 on_update => "CASCADE",
137 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54
138 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gEngecP849wzHprYW7H2tw
141 # You can replace this text with custom content, and it will be preserved on regeneration