Bug 17855 - Followup patch following requests in comments 176 and 177
[koha.git] / Koha / Schema / Result / TagAll.pm
blob99d1e038c7f7fb7813fa53203a35a72641631e17
1 use utf8;
2 package Koha::Schema::Result::TagAll;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::TagAll
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<tags_all>
20 =cut
22 __PACKAGE__->table("tags_all");
24 =head1 ACCESSORS
26 =head2 tag_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: 1
38 =head2 biblionumber
40 data_type: 'integer'
41 is_foreign_key: 1
42 is_nullable: 0
44 =head2 term
46 data_type: 'varchar'
47 is_nullable: 0
48 size: 255
50 =head2 language
52 data_type: 'integer'
53 is_nullable: 1
55 =head2 date_created
57 data_type: 'datetime'
58 datetime_undef_if_invalid: 1
59 is_nullable: 0
61 =cut
63 __PACKAGE__->add_columns(
64 "tag_id",
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 => 0 },
70 "term",
71 { data_type => "varchar", is_nullable => 0, size => 255 },
72 "language",
73 { data_type => "integer", is_nullable => 1 },
74 "date_created",
76 data_type => "datetime",
77 datetime_undef_if_invalid => 1,
78 is_nullable => 0,
82 =head1 PRIMARY KEY
84 =over 4
86 =item * L</tag_id>
88 =back
90 =cut
92 __PACKAGE__->set_primary_key("tag_id");
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" },
108 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
111 =head2 borrowernumber
113 Type: belongs_to
115 Related object: L<Koha::Schema::Result::Borrower>
117 =cut
119 __PACKAGE__->belongs_to(
120 "borrowernumber",
121 "Koha::Schema::Result::Borrower",
122 { borrowernumber => "borrowernumber" },
124 is_deferrable => 1,
125 join_type => "LEFT",
126 on_delete => "SET NULL",
127 on_update => "CASCADE",
132 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-03-04 19:32:39
133 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gyjzwAoUL27c/7NqM8+RaA
136 # You can replace this text with custom content, and it will be preserved on regeneration