Bug 21797: Update two-column templates with Bootstrap grid: Acquisitions part 5
[koha.git] / Koha / Schema / Result / ClassSource.pm
blob2bc8f3a63864122c11bca8e371f2747865d21f44
1 use utf8;
2 package Koha::Schema::Result::ClassSource;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::ClassSource
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<class_sources>
20 =cut
22 __PACKAGE__->table("class_sources");
24 =head1 ACCESSORS
26 =head2 cn_source
28 data_type: 'varchar'
29 default_value: (empty string)
30 is_nullable: 0
31 size: 10
33 =head2 description
35 data_type: 'longtext'
36 is_nullable: 1
38 =head2 used
40 data_type: 'tinyint'
41 default_value: 0
42 is_nullable: 0
44 =head2 class_sort_rule
46 data_type: 'varchar'
47 default_value: (empty string)
48 is_foreign_key: 1
49 is_nullable: 0
50 size: 10
52 =head2 class_split_rule
54 data_type: 'varchar'
55 default_value: (empty string)
56 is_foreign_key: 1
57 is_nullable: 0
58 size: 10
60 =cut
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",
71 data_type => "varchar",
72 default_value => "",
73 is_foreign_key => 1,
74 is_nullable => 0,
75 size => 10,
77 "class_split_rule",
79 data_type => "varchar",
80 default_value => "",
81 is_foreign_key => 1,
82 is_nullable => 0,
83 size => 10,
87 =head1 PRIMARY KEY
89 =over 4
91 =item * L</cn_source>
93 =back
95 =cut
97 __PACKAGE__->set_primary_key("cn_source");
99 =head1 RELATIONS
101 =head2 class_sort_rule
103 Type: belongs_to
105 Related object: L<Koha::Schema::Result::ClassSortRule>
107 =cut
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" },
116 =head2 class_split_rule
118 Type: belongs_to
120 Related object: L<Koha::Schema::Result::ClassSplitRule>
122 =cut
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" },
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
136 # You can replace this text with custom content, and it will be preserved on regeneration