Bug 21797: Update two-column templates with Bootstrap grid: Acquisitions part 5
[koha.git] / Koha / Schema / Result / AuthorisedValue.pm
blob7b978eb3b88fdb52075d49a6ff1709656dfb5fb8
1 use utf8;
2 package Koha::Schema::Result::AuthorisedValue;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::AuthorisedValue
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<authorised_values>
20 =cut
22 __PACKAGE__->table("authorised_values");
24 =head1 ACCESSORS
26 =head2 id
28 data_type: 'integer'
29 is_auto_increment: 1
30 is_nullable: 0
32 =head2 category
34 data_type: 'varchar'
35 default_value: (empty string)
36 is_foreign_key: 1
37 is_nullable: 0
38 size: 32
40 =head2 authorised_value
42 data_type: 'varchar'
43 default_value: (empty string)
44 is_nullable: 0
45 size: 80
47 =head2 lib
49 data_type: 'varchar'
50 is_nullable: 1
51 size: 200
53 =head2 lib_opac
55 data_type: 'varchar'
56 is_nullable: 1
57 size: 200
59 =head2 imageurl
61 data_type: 'varchar'
62 is_nullable: 1
63 size: 200
65 =cut
67 __PACKAGE__->add_columns(
68 "id",
69 { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
70 "category",
72 data_type => "varchar",
73 default_value => "",
74 is_foreign_key => 1,
75 is_nullable => 0,
76 size => 32,
78 "authorised_value",
79 { data_type => "varchar", default_value => "", is_nullable => 0, size => 80 },
80 "lib",
81 { data_type => "varchar", is_nullable => 1, size => 200 },
82 "lib_opac",
83 { data_type => "varchar", is_nullable => 1, size => 200 },
84 "imageurl",
85 { data_type => "varchar", is_nullable => 1, size => 200 },
88 =head1 PRIMARY KEY
90 =over 4
92 =item * L</id>
94 =back
96 =cut
98 __PACKAGE__->set_primary_key("id");
100 =head1 RELATIONS
102 =head2 authorised_values_branches
104 Type: has_many
106 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
108 =cut
110 __PACKAGE__->has_many(
111 "authorised_values_branches",
112 "Koha::Schema::Result::AuthorisedValuesBranch",
113 { "foreign.av_id" => "self.id" },
114 { cascade_copy => 0, cascade_delete => 0 },
117 =head2 category
119 Type: belongs_to
121 Related object: L<Koha::Schema::Result::AuthorisedValueCategory>
123 =cut
125 __PACKAGE__->belongs_to(
126 "category",
127 "Koha::Schema::Result::AuthorisedValueCategory",
128 { category_name => "category" },
129 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
133 # Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-04-26 16:13:07
134 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YwvGOd/jzk71ekWfO56xrw
137 # You can replace this text with custom code or comments, and it will be preserved on regeneration