root/veekun/trunk/lib/Vee/Schema/Groups.pm @ 406

Revision 406, 0.5 KB (checked in by eevee, 22 months ago)

Database refactoring. Renamed columns and tables to be more consistent and more readable. (#58)

Line 
1package Vee::Schema::Groups;
2
3use strict;
4use warnings;
5use base 'DBIx::Class';
6
7=head1 NAME
8
9Vee::Schema::Groups - DBIC class for the C<groups> table
10
11=cut
12
13__PACKAGE__->load_components('Core');
14__PACKAGE__->table('groups');
15__PACKAGE__->add_columns(qw/ id icon name /);
16__PACKAGE__->set_primary_key('id');
17
18__PACKAGE__->has_many(user_groups => 'Vee::Schema::UserGroups', 'group_id');
19__PACKAGE__->has_many(permissions => 'Vee::Schema::GroupPermissions', 'group_id');
20__PACKAGE__->many_to_many('users' => 'user_groups', 'user');
21
221;
Note: See TracBrowser for help on using the browser.