Commit | Line | Data |
527b7d89 |
1 | package DBICTest::Schema::Genre; |
2 | |
3 | use strict; |
4 | |
660cf1be |
5 | use base qw/DBICTest::BaseResult/; |
527b7d89 |
6 | |
7 | __PACKAGE__->table('genre'); |
87310237 |
8 | __PACKAGE__->add_columns( |
9 | genreid => { |
10 | data_type => 'integer', |
11 | is_auto_increment => 1, |
12 | }, |
13 | name => { |
14 | data_type => 'varchar', |
15 | size => 100, |
16 | }, |
17 | ); |
527b7d89 |
18 | __PACKAGE__->set_primary_key('genreid'); |
87310237 |
19 | __PACKAGE__->add_unique_constraint ( genre_name => [qw/name/] ); |
527b7d89 |
20 | |
87310237 |
21 | __PACKAGE__->has_many (cds => 'DBICTest::Schema::CD', 'genreid'); |
527b7d89 |
22 | |
2284af7e |
23 | __PACKAGE__->has_one (model_cd => 'DBICTest::Schema::CD', 'genreid'); |
24 | |
527b7d89 |
25 | 1; |