Bug 25655: DBIC schema
[srvgit] / Koha / Schema / Result / UserPermission.pm
1 use utf8;
2 package Koha::Schema::Result::UserPermission;
3
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7 =head1 NAME
8
9 Koha::Schema::Result::UserPermission
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<user_permissions>
19
20 =cut
21
22 __PACKAGE__->table("user_permissions");
23
24 =head1 ACCESSORS
25
26 =head2 borrowernumber
27
28   data_type: 'integer'
29   default_value: 0
30   is_foreign_key: 1
31   is_nullable: 0
32
33 =head2 module_bit
34
35   data_type: 'integer'
36   default_value: 0
37   is_foreign_key: 1
38   is_nullable: 0
39
40 =head2 code
41
42   data_type: 'varchar'
43   is_foreign_key: 1
44   is_nullable: 0
45   size: 64
46
47 =cut
48
49 __PACKAGE__->add_columns(
50   "borrowernumber",
51   {
52     data_type      => "integer",
53     default_value  => 0,
54     is_foreign_key => 1,
55     is_nullable    => 0,
56   },
57   "module_bit",
58   {
59     data_type      => "integer",
60     default_value  => 0,
61     is_foreign_key => 1,
62     is_nullable    => 0,
63   },
64   "code",
65   { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 64 },
66 );
67
68 =head1 PRIMARY KEY
69
70 =over 4
71
72 =item * L</borrowernumber>
73
74 =item * L</module_bit>
75
76 =item * L</code>
77
78 =back
79
80 =cut
81
82 __PACKAGE__->set_primary_key("borrowernumber", "module_bit", "code");
83
84 =head1 RELATIONS
85
86 =head2 borrowernumber
87
88 Type: belongs_to
89
90 Related object: L<Koha::Schema::Result::Borrower>
91
92 =cut
93
94 __PACKAGE__->belongs_to(
95   "borrowernumber",
96   "Koha::Schema::Result::Borrower",
97   { borrowernumber => "borrowernumber" },
98   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
99 );
100
101 =head2 permission
102
103 Type: belongs_to
104
105 Related object: L<Koha::Schema::Result::Permission>
106
107 =cut
108
109 __PACKAGE__->belongs_to(
110   "permission",
111   "Koha::Schema::Result::Permission",
112   { code => "code", module_bit => "module_bit" },
113   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
114 );
115
116
117 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-25 00:33:23
118 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sp3t39eo8WmHNKGljRXyEw
119
120
121 # You can replace this text with custom content, and it will be preserved on regeneration
122 1;