Bug 22417: DBIX Schema changes
[koha.git] / Koha / Schema / Result / ClassSource.pm
1 use utf8;
2 package Koha::Schema::Result::ClassSource;
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::ClassSource
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<class_sources>
19
20 =cut
21
22 __PACKAGE__->table("class_sources");
23
24 =head1 ACCESSORS
25
26 =head2 cn_source
27
28   data_type: 'varchar'
29   default_value: (empty string)
30   is_nullable: 0
31   size: 10
32
33 =head2 description
34
35   data_type: 'longtext'
36   is_nullable: 1
37
38 =head2 used
39
40   data_type: 'tinyint'
41   default_value: 0
42   is_nullable: 0
43
44 =head2 class_sort_rule
45
46   data_type: 'varchar'
47   default_value: (empty string)
48   is_foreign_key: 1
49   is_nullable: 0
50   size: 10
51
52 =head2 class_split_rule
53
54   data_type: 'varchar'
55   default_value: (empty string)
56   is_foreign_key: 1
57   is_nullable: 0
58   size: 10
59
60 =cut
61
62 __PACKAGE__->add_columns(
63   "cn_source",
64   { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
65   "description",
66   { data_type => "longtext", is_nullable => 1 },
67   "used",
68   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
69   "class_sort_rule",
70   {
71     data_type => "varchar",
72     default_value => "",
73     is_foreign_key => 1,
74     is_nullable => 0,
75     size => 10,
76   },
77   "class_split_rule",
78   {
79     data_type => "varchar",
80     default_value => "",
81     is_foreign_key => 1,
82     is_nullable => 0,
83     size => 10,
84   },
85 );
86
87 =head1 PRIMARY KEY
88
89 =over 4
90
91 =item * L</cn_source>
92
93 =back
94
95 =cut
96
97 __PACKAGE__->set_primary_key("cn_source");
98
99 =head1 RELATIONS
100
101 =head2 class_sort_rule
102
103 Type: belongs_to
104
105 Related object: L<Koha::Schema::Result::ClassSortRule>
106
107 =cut
108
109 __PACKAGE__->belongs_to(
110   "class_sort_rule",
111   "Koha::Schema::Result::ClassSortRule",
112   { class_sort_rule => "class_sort_rule" },
113   { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
114 );
115
116 =head2 class_split_rule
117
118 Type: belongs_to
119
120 Related object: L<Koha::Schema::Result::ClassSplitRule>
121
122 =cut
123
124 __PACKAGE__->belongs_to(
125   "class_split_rule",
126   "Koha::Schema::Result::ClassSplitRule",
127   { class_split_rule => "class_split_rule" },
128   { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
129 );
130
131
132 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2018-11-13 15:24:28
133 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bD/Why2Bt7rmnA9cCLIPsA
134
135
136 # You can replace this text with custom content, and it will be preserved on regeneration
137 1;