Bug 23435: Add multiple copies of an item when receiving in serials
[koha.git] / Koha / Schema / Result / AuthorisedValueCategory.pm
1 use utf8;
2 package Koha::Schema::Result::AuthorisedValueCategory;
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::AuthorisedValueCategory
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<authorised_value_categories>
19
20 =cut
21
22 __PACKAGE__->table("authorised_value_categories");
23
24 =head1 ACCESSORS
25
26 =head2 category_name
27
28   data_type: 'varchar'
29   default_value: (empty string)
30   is_nullable: 0
31   size: 32
32
33 =cut
34
35 __PACKAGE__->add_columns(
36   "category_name",
37   { data_type => "varchar", default_value => "", is_nullable => 0, size => 32 },
38 );
39
40 =head1 PRIMARY KEY
41
42 =over 4
43
44 =item * L</category_name>
45
46 =back
47
48 =cut
49
50 __PACKAGE__->set_primary_key("category_name");
51
52 =head1 RELATIONS
53
54 =head2 authorised_values
55
56 Type: has_many
57
58 Related object: L<Koha::Schema::Result::AuthorisedValue>
59
60 =cut
61
62 __PACKAGE__->has_many(
63   "authorised_values",
64   "Koha::Schema::Result::AuthorisedValue",
65   { "foreign.category" => "self.category_name" },
66   { cascade_copy => 0, cascade_delete => 0 },
67 );
68
69 =head2 items_search_fields
70
71 Type: has_many
72
73 Related object: L<Koha::Schema::Result::ItemsSearchField>
74
75 =cut
76
77 __PACKAGE__->has_many(
78   "items_search_fields",
79   "Koha::Schema::Result::ItemsSearchField",
80   { "foreign.authorised_values_category" => "self.category_name" },
81   { cascade_copy => 0, cascade_delete => 0 },
82 );
83
84 =head2 marc_subfield_structures
85
86 Type: has_many
87
88 Related object: L<Koha::Schema::Result::MarcSubfieldStructure>
89
90 =cut
91
92 __PACKAGE__->has_many(
93   "marc_subfield_structures",
94   "Koha::Schema::Result::MarcSubfieldStructure",
95   { "foreign.authorised_value" => "self.category_name" },
96   { cascade_copy => 0, cascade_delete => 0 },
97 );
98
99
100 # Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-08-30 11:59:31
101 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6vToj9pUcIv8Jio38rNE4g
102
103
104 # You can replace this text with custom code or comments, and it will be preserved on regeneration
105 1;