7ad6ef86912286eeca9e8844a9332c145693bf7b
[catagits/Catalyst-Authentication-Store-DBIx-Class.git] / t / lib / TestApp / Schema / User.pm
1 package TestApp::Schema::User;
2
3 use strict;
4 use warnings;
5 use base 'DBIx::Class';
6
7 __PACKAGE__->load_components(qw/ Core /);
8
9 __PACKAGE__->table( 'user' );
10
11 __PACKAGE__->add_columns( qw/id username email status role_text session_data/ );
12
13 __PACKAGE__->add_column(password => { accessor => 'password_accessor' });
14
15 __PACKAGE__->set_primary_key( 'id' );
16
17 __PACKAGE__->has_many( 'map_user_role' => 'TestApp::Schema::UserRole' => 'user' );
18
19 __PACKAGE__->many_to_many( roles => 'map_user_role', 'role');
20
21 1;