Commit | Line | Data |
406086f3 |
1 | package # hide from PAUSE |
d2739840 |
2 | RestTest::Schema::Result::Artist; |
3 | |
4 | use base 'DBIx::Class'; |
5 | |
6 | __PACKAGE__->load_components('Core'); |
7 | __PACKAGE__->table('artist'); |
8 | __PACKAGE__->add_columns( |
9 | 'artistid' => { |
10 | data_type => 'integer', |
11 | is_auto_increment => 1, |
12 | }, |
13 | 'name' => { |
14 | data_type => 'varchar', |
15 | size => 100, |
16 | is_nullable => 1, |
17 | }, |
18 | ); |
19 | __PACKAGE__->set_primary_key('artistid'); |
20 | |
21 | __PACKAGE__->has_many( |
22 | cds => 'RestTest::Schema::Result::CD', undef, |
23 | { order_by => 'year' }, |
24 | ); |
25 | |
26 | 1; |