From b14645b02800a90b20ade8996b56690ad9bd445e Mon Sep 17 00:00:00 2001 From: harvested Date: Sat, 27 Dec 2014 00:48:55 +0100 Subject: [PATCH] added new model class `UserRoles.pm` as lookup table, issue: #2 --- lib/MyIMDB/Models/UserRoles.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/MyIMDB/Models/UserRoles.pm diff --git a/lib/MyIMDB/Models/UserRoles.pm b/lib/MyIMDB/Models/UserRoles.pm new file mode 100644 index 0000000..99b02c7 --- /dev/null +++ b/lib/MyIMDB/Models/UserRoles.pm @@ -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;