| 1 | package DBIO::Test::Schema::Genre; | ||
| 2 | # ABSTRACT: Test result class for the genre table | ||
| 3 | |||
| 4 | 256 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 256 | our $VERSION = '0.900007'; | |
| 7 | |||
| 8 | 256 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 256 | ▶ | use base qw/DBIO::Test::BaseResult/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 256 | __PACKAGE__->table('genre'); | |
| 13 | 256 | __PACKAGE__->add_columns( | |
| 14 | genreid => { | ||
| 15 | data_type => 'integer', | ||
| 16 | is_auto_increment => 1, | ||
| 17 | }, | ||
| 18 | name => { | ||
| 19 | data_type => 'varchar', | ||
| 20 | size => 100, | ||
| 21 | }, | ||
| 22 | ); | ||
| 23 | 256 | __PACKAGE__->set_primary_key('genreid'); | |
| 24 | 256 | __PACKAGE__->add_unique_constraint ( genre_name => [qw/name/] ); | |
| 25 | |||
| 26 | 256 | __PACKAGE__->has_many (cds => 'DBIO::Test::Schema::CD', 'genreid'); | |
| 27 | |||
| 28 | 256 | __PACKAGE__->has_one (model_cd => 'DBIO::Test::Schema::CD', 'genreid'); | |
| 29 | |||
| 30 | 256 | 1; | |
| 31 | |||
| 32 | __END__ | ||