Commit | Line | Data |
---|---|---|
c6d74d3e | 1 | package # hide from PAUSE |
2 | MyStar; | |
ea2e61bf | 3 | |
ea2e61bf | 4 | use base 'MyBase'; |
5 | ||
6 | use strict; | |
7 | ||
8 | __PACKAGE__->set_table(); | |
9 | __PACKAGE__->columns(All => qw/starid name/); | |
10 | __PACKAGE__->has_many(films => [ MyStarLink => 'film' ]); | |
11 | ||
12 | # sub films { map $_->film, shift->_films } | |
13 | ||
14 | sub create_sql { | |
15 | return qq{ | |
16 | starid TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY, | |
17 | name VARCHAR(255) | |
18 | }; | |
19 | } | |
20 | ||
21 | 1; | |
22 |