394844d6d9fbd9c27898cc67c070714316ccb714
[koha.git] / Koha / Schema / Result / AuthorisedValue.pm
1 use utf8;
2 package Koha::Schema::Result::AuthorisedValue;
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::AuthorisedValue
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<authorised_values>
19
20 =cut
21
22 __PACKAGE__->table("authorised_values");
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 category
33
34   data_type: 'varchar'
35   default_value: (empty string)
36   is_foreign_key: 1
37   is_nullable: 0
38   size: 32
39
40 =head2 authorised_value
41
42   data_type: 'varchar'
43   default_value: (empty string)
44   is_nullable: 0
45   size: 80
46
47 =head2 lib
48
49   data_type: 'varchar'
50   is_nullable: 1
51   size: 200
52
53 =head2 lib_opac
54
55   data_type: 'varchar'
56   is_nullable: 1
57   size: 200
58
59 =head2 imageurl
60
61   data_type: 'varchar'
62   is_nullable: 1
63   size: 200
64
65 =cut
66
67 __PACKAGE__->add_columns(
68   "id",
69   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
70   "category",
71   {
72     data_type => "varchar",
73     default_value => "",
74     is_foreign_key => 1,
75     is_nullable => 0,
76     size => 32,
77   },
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 },
86 );
87
88 =head1 PRIMARY KEY
89
90 =over 4
91
92 =item * L</id>
93
94 =back
95
96 =cut
97
98 __PACKAGE__->set_primary_key("id");
99
100 =head1 RELATIONS
101
102 =head2 authorised_values_branches
103
104 Type: has_many
105
106 Related object: L<Koha::Schema::Result::AuthorisedValuesBranch>
107
108 =cut
109
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 },
115 );
116
117 =head2 category
118
119 Type: belongs_to
120
121 Related object: L<Koha::Schema::Result::AuthorisedValueCategory>
122
123 =cut
124
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" },
130 );
131
132
133 # Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-08-30 11:52:45
134 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LOArv8JQ0aiTZgcy+jb7pA
135
136
137 # You can replace this text with custom content, and it will be preserved on regeneration
138 1;