Bug 8798: DBIx::Class base classes for all Koha tables
[koha-equinox.git] / Koha / Schema / Result / TagsApproval.pm
1 package Koha::Schema::Result::TagsApproval;
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::TagsApproval
15
16 =cut
17
18 __PACKAGE__->table("tags_approval");
19
20 =head1 ACCESSORS
21
22 =head2 term
23
24   data_type: 'varchar'
25   is_nullable: 0
26   size: 255
27
28 =head2 approved
29
30   data_type: 'integer'
31   default_value: 0
32   is_nullable: 0
33
34 =head2 date_approved
35
36   data_type: 'datetime'
37   is_nullable: 1
38
39 =head2 approved_by
40
41   data_type: 'integer'
42   is_foreign_key: 1
43   is_nullable: 1
44
45 =head2 weight_total
46
47   data_type: 'integer'
48   default_value: 1
49   is_nullable: 0
50
51 =cut
52
53 __PACKAGE__->add_columns(
54   "term",
55   { data_type => "varchar", is_nullable => 0, size => 255 },
56   "approved",
57   { data_type => "integer", default_value => 0, is_nullable => 0 },
58   "date_approved",
59   { data_type => "datetime", is_nullable => 1 },
60   "approved_by",
61   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
62   "weight_total",
63   { data_type => "integer", default_value => 1, is_nullable => 0 },
64 );
65 __PACKAGE__->set_primary_key("term");
66
67 =head1 RELATIONS
68
69 =head2 approved_by
70
71 Type: belongs_to
72
73 Related object: L<Koha::Schema::Result::Borrower>
74
75 =cut
76
77 __PACKAGE__->belongs_to(
78   "approved_by",
79   "Koha::Schema::Result::Borrower",
80   { borrowernumber => "approved_by" },
81   { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
82 );
83
84 =head2 tags_indexes
85
86 Type: has_many
87
88 Related object: L<Koha::Schema::Result::TagsIndex>
89
90 =cut
91
92 __PACKAGE__->has_many(
93   "tags_indexes",
94   "Koha::Schema::Result::TagsIndex",
95   { "foreign.term" => "self.term" },
96   { cascade_copy => 0, cascade_delete => 0 },
97 );
98
99
100 # Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15
101 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0C4z7rRUg2mcdmdrUOGcYw
102
103
104 # You can replace this text with custom content, and it will be preserved on regeneration
105 1;