/
Role.pm
120 lines (75 loc) · 1.84 KB
/
Role.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
use utf8;
package ShinyCMS::Schema::Result::Role;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
ShinyCMS::Schema::Result::Role
=cut
use strict;
use warnings;
use Moose;
use MooseX::NonMoose;
use MooseX::MarkAsMethods autoclean => 1;
extends 'DBIx::Class::Core';
=head1 COMPONENTS LOADED
=over 4
=item * L<DBIx::Class::InflateColumn::DateTime>
=item * L<DBIx::Class::TimeStamp>
=item * L<DBIx::Class::EncodedColumn>
=back
=cut
__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp", "EncodedColumn");
=head1 TABLE: C<role>
=cut
__PACKAGE__->table("role");
=head1 ACCESSORS
=head2 id
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 role
data_type: 'varchar'
is_nullable: 0
size: 50
=head2 created
data_type: 'timestamp'
datetime_undef_if_invalid: 1
default_value: current_timestamp
is_nullable: 0
=cut
__PACKAGE__->add_columns(
"id",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"role",
{ data_type => "varchar", is_nullable => 0, size => 50 },
"created",
{
data_type => "timestamp",
datetime_undef_if_invalid => 1,
default_value => \"current_timestamp",
is_nullable => 0,
},
);
=head1 PRIMARY KEY
=over 4
=item * L</id>
=back
=cut
__PACKAGE__->set_primary_key("id");
=head1 RELATIONS
=head2 user_roles
Type: has_many
Related object: L<ShinyCMS::Schema::Result::UserRole>
=cut
__PACKAGE__->has_many(
"user_roles",
"ShinyCMS::Schema::Result::UserRole",
{ "foreign.role" => "self.id" },
{ cascade_copy => 0, cascade_delete => 0 },
);
# Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-03-08 18:42:22
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UMoBp5B3miLJcDuaalPmOw
__PACKAGE__->many_to_many( users => 'user_roles', 'user' );
# EOF
__PACKAGE__->meta->make_immutable;
1;