| 1 | package Mojolicious::Plugin::Fondation::Group::Schema::Result::UserGroup; | ||
| 2 | 1 | $Mojolicious::Plugin::Fondation::Group::Schema::Result::UserGroup::VERSION = '0.03'; | |
| 3 | # ABSTRACT: DBIx::Class Result class for user_group pivot table | ||
| 4 | |||
| 5 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 1 | ▶ | use base 'Mojolicious::Plugin::Fondation::Schema::Result::Base'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 1 | __PACKAGE__->load_components(qw/TimeStamp Core/); | |
| 11 | |||
| 12 | 1 | __PACKAGE__->table('user_group'); | |
| 13 | |||
| 14 | 1 | __PACKAGE__->add_columns( | |
| 15 | id => { data_type => 'integer', is_auto_increment => 1, is_nullable => 0 }, | ||
| 16 | user_id => { data_type => 'integer', is_nullable => 0 }, | ||
| 17 | group_id => { data_type => 'integer', is_nullable => 0 }, | ||
| 18 | |||
| 19 | created_at => { data_type => 'datetime', is_nullable => 0, set_on_create => 1, set_on_update => 1 }, | ||
| 20 | ); | ||
| 21 | |||
| 22 | 1 | __PACKAGE__->set_primary_key('id'); | |
| 23 | |||
| 24 | 1 | __PACKAGE__->belongs_to( | |
| 25 | 'group', | ||
| 26 | 'Mojolicious::Plugin::Fondation::Group::Schema::Result::Group', | ||
| 27 | 'group_id', | ||
| 28 | ); | ||
| 29 | |||
| 30 | 1 | 1; | |
| 31 | |||
| 32 | __END__ | ||