Bug 8798: DBIx::Class base classes for all Koha tables
[koha.git] / Koha / Schema / Result / Branchcategory.pm
1 package Koha::Schema::Result::Branchcategory;
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::Branchcategory
15
16 =cut
17
18 __PACKAGE__->table("branchcategories");
19
20 =head1 ACCESSORS
21
22 =head2 categorycode
23
24   data_type: 'varchar'
25   default_value: (empty string)
26   is_nullable: 0
27   size: 10
28
29 =head2 categoryname
30
31   data_type: 'varchar'
32   is_nullable: 1
33   size: 32
34
35 =head2 codedescription
36
37   data_type: 'mediumtext'
38   is_nullable: 1
39
40 =head2 categorytype
41
42   data_type: 'varchar'
43   is_nullable: 1
44   size: 16
45
46 =cut
47
48 __PACKAGE__->add_columns(
49   "categorycode",
50   { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
51   "categoryname",
52   { data_type => "varchar", is_nullable => 1, size => 32 },
53   "codedescription",
54   { data_type => "mediumtext", is_nullable => 1 },
55   "categorytype",
56   { data_type => "varchar", is_nullable => 1, size => 16 },
57 );
58 __PACKAGE__->set_primary_key("categorycode");
59
60 =head1 RELATIONS
61
62 =head2 branchrelations
63
64 Type: has_many
65
66 Related object: L<Koha::Schema::Result::Branchrelation>
67
68 =cut
69
70 __PACKAGE__->has_many(
71   "branchrelations",
72   "Koha::Schema::Result::Branchrelation",
73   { "foreign.categorycode" => "self.categorycode" },
74   { cascade_copy => 0, cascade_delete => 0 },
75 );
76
77
78 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
79 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:i3um3oAfQ9EV/pJHuUiWnA
80
81
82 # You can replace this text with custom content, and it will be preserved on regeneration
83 1;