Bug 21395: Fix creation of PO file
[koha.git] / Koha / Schema / Result / Permission.pm
blobe2444ee0ada4d8e41603970159a327c4553c898a
1 use utf8;
2 package Koha::Schema::Result::Permission;
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
7 =head1 NAME
9 Koha::Schema::Result::Permission
11 =cut
13 use strict;
14 use warnings;
16 use base 'DBIx::Class::Core';
18 =head1 TABLE: C<permissions>
20 =cut
22 __PACKAGE__->table("permissions");
24 =head1 ACCESSORS
26 =head2 module_bit
28 data_type: 'integer'
29 default_value: 0
30 is_foreign_key: 1
31 is_nullable: 0
33 =head2 code
35 data_type: 'varchar'
36 default_value: (empty string)
37 is_nullable: 0
38 size: 64
40 =head2 description
42 data_type: 'varchar'
43 is_nullable: 1
44 size: 255
46 =cut
48 __PACKAGE__->add_columns(
49 "module_bit",
51 data_type => "integer",
52 default_value => 0,
53 is_foreign_key => 1,
54 is_nullable => 0,
56 "code",
57 { data_type => "varchar", default_value => "", is_nullable => 0, size => 64 },
58 "description",
59 { data_type => "varchar", is_nullable => 1, size => 255 },
62 =head1 PRIMARY KEY
64 =over 4
66 =item * L</module_bit>
68 =item * L</code>
70 =back
72 =cut
74 __PACKAGE__->set_primary_key("module_bit", "code");
76 =head1 RELATIONS
78 =head2 module_bit
80 Type: belongs_to
82 Related object: L<Koha::Schema::Result::Userflag>
84 =cut
86 __PACKAGE__->belongs_to(
87 "module_bit",
88 "Koha::Schema::Result::Userflag",
89 { bit => "module_bit" },
90 { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
93 =head2 user_permissions
95 Type: has_many
97 Related object: L<Koha::Schema::Result::UserPermission>
99 =cut
101 __PACKAGE__->has_many(
102 "user_permissions",
103 "Koha::Schema::Result::UserPermission",
105 "foreign.code" => "self.code",
106 "foreign.module_bit" => "self.module_bit",
108 { cascade_copy => 0, cascade_delete => 0 },
112 # Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
113 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ut3lzlxoPPoIIwmhJViV1Q
116 # You can replace this text with custom content, and it will be preserved on regeneration