Bug 21797: Update two-column templates with Bootstrap grid: Acquisitions part 5
[koha.git] / Koha / Schema / Result / TagsApproval.pm
blob92648b4f84defe139f56c4768d0e4bda8771ebe3
1 use utf8;
2 package Koha::Schema::Result::TagsApproval;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::TagsApproval
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<tags_approval>
20 =cut
22 __PACKAGE__->table("tags_approval");
24 =head1 ACCESSORS
26 =head2 term
28 data_type: 'varchar'
29 is_nullable: 0
30 size: 191
32 =head2 approved
34 data_type: 'integer'
35 default_value: 0
36 is_nullable: 0
38 =head2 date_approved
40 data_type: 'datetime'
41 datetime_undef_if_invalid: 1
42 is_nullable: 1
44 =head2 approved_by
46 data_type: 'integer'
47 is_foreign_key: 1
48 is_nullable: 1
50 =head2 weight_total
52 data_type: 'integer'
53 default_value: 1
54 is_nullable: 0
56 =cut
58 __PACKAGE__->add_columns(
59 "term",
60 { data_type => "varchar", is_nullable => 0, size => 191 },
61 "approved",
62 { data_type => "integer", default_value => 0, is_nullable => 0 },
63 "date_approved",
65 data_type => "datetime",
66 datetime_undef_if_invalid => 1,
67 is_nullable => 1,
69 "approved_by",
70 { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
71 "weight_total",
72 { data_type => "integer", default_value => 1, is_nullable => 0 },
75 =head1 PRIMARY KEY
77 =over 4
79 =item * L</term>
81 =back
83 =cut
85 __PACKAGE__->set_primary_key("term");
87 =head1 RELATIONS
89 =head2 approved_by
91 Type: belongs_to
93 Related object: L<Koha::Schema::Result::Borrower>
95 =cut
97 __PACKAGE__->belongs_to(
98 "approved_by",
99 "Koha::Schema::Result::Borrower",
100 { borrowernumber => "approved_by" },
102 is_deferrable => 1,
103 join_type => "LEFT",
104 on_delete => "SET NULL",
105 on_update => "CASCADE",
109 =head2 tags_indexes
111 Type: has_many
113 Related object: L<Koha::Schema::Result::TagsIndex>
115 =cut
117 __PACKAGE__->has_many(
118 "tags_indexes",
119 "Koha::Schema::Result::TagsIndex",
120 { "foreign.term" => "self.term" },
121 { cascade_copy => 0, cascade_delete => 0 },
125 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-01-18 08:31:57
126 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4cvTasSpJ2c1vvVVe/R3UQ
129 # You can replace this text with custom content, and it will be preserved on regeneration