Skip to content

Commit

Permalink
added new model class UserRoles.pm as lookup table, issue: #2
Browse files Browse the repository at this point in the history
  • Loading branch information
harvested committed Dec 26, 2014
1 parent 0a20767 commit b14645b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/MyIMDB/Models/UserRoles.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package UserRoles;

use strict;
use warnings;

use base 'MyIMDB::Models::Object';

__PACKAGE__->meta->setup(
table => 'user_roles',
columns => [ qw(user_id role_id) ],
pk_columns => [ qw(user_id role_id) ],
foreign_keys => [ qw(users roles) ],
);

1;

0 comments on commit b14645b

Please sign in to comment.