Bug 8798: DBIx::Class base classes for all Koha tables
[koha.git] / Koha / Schema / Result / ClassSortRule.pm
1 package Koha::Schema::Result::ClassSortRule;
2
3 # Created by DBIx::Class::Schema::Loader
4 # DO NOT MODIFY THE FIRST PART OF THIS FILE
5
6 use strict;
7 use warnings;
8
9 use base 'DBIx::Class::Core';
10
11
12 =head1 NAME
13
14 Koha::Schema::Result::ClassSortRule
15
16 =cut
17
18 __PACKAGE__->table("class_sort_rules");
19
20 =head1 ACCESSORS
21
22 =head2 class_sort_rule
23
24   data_type: 'varchar'
25   default_value: (empty string)
26   is_nullable: 0
27   size: 10
28
29 =head2 description
30
31   data_type: 'mediumtext'
32   is_nullable: 1
33
34 =head2 sort_routine
35
36   data_type: 'varchar'
37   default_value: (empty string)
38   is_nullable: 0
39   size: 30
40
41 =cut
42
43 __PACKAGE__->add_columns(
44   "class_sort_rule",
45   { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
46   "description",
47   { data_type => "mediumtext", is_nullable => 1 },
48   "sort_routine",
49   { data_type => "varchar", default_value => "", is_nullable => 0, size => 30 },
50 );
51 __PACKAGE__->set_primary_key("class_sort_rule");
52
53 =head1 RELATIONS
54
55 =head2 class_sources
56
57 Type: has_many
58
59 Related object: L<Koha::Schema::Result::ClassSource>
60
61 =cut
62
63 __PACKAGE__->has_many(
64   "class_sources",
65   "Koha::Schema::Result::ClassSource",
66   { "foreign.class_sort_rule" => "self.class_sort_rule" },
67   { cascade_copy => 0, cascade_delete => 0 },
68 );
69
70
71 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
72 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3JLMzBsuge+hUAqcXVtgzQ
73
74
75 # You can replace this text with custom content, and it will be preserved on regeneration
76 1;