Commit | Line | Data |
f8cbb1c8 |
1 | package AuthApp::Schema::Result::User; |
2 | |
3 | use base 'DBIx::Class::Core'; |
4 | |
5 | __PACKAGE__->load_components(qw(InflateColumn::Authen::Passphrase)); |
6 | __PACKAGE__->table('users'); |
7 | __PACKAGE__->add_columns( |
8 | id => { |
9 | data_type => 'integer', |
10 | is_auto_increment => 1, |
11 | }, |
12 | username => { |
13 | data_type => 'TINYTEXT', |
14 | }, |
15 | password => { |
16 | data_type => 'varchar', |
17 | size => 255, |
18 | inflate_passphrase => 'rfc2307', |
19 | }, |
20 | ); |
21 | |
22 | __PACKAGE__->set_primary_key('id'); |
23 | __PACKAGE__->add_unique_constraint('username' => ['username']); |
24 | |
25 | 1; |
26 | |
27 | |