« lib/Video/PlaybackMachine/Schema.pm
↑ Summary
lib/Video/PlaybackMachine/Schema/Result/ScheduleEntryEnd.pm »
| 1 | package Video::PlaybackMachine::Schema::Result::MovieInfo; | ||
| 2 | |||
| 3 | 3 | our $VERSION = '0.09'; # VERSION | |
| 4 | |||
| 5 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 3 | ▶ | use base 'DBIx::Class::Core'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 3 | __PACKAGE__->table('movie_info'); | |
| 11 | |||
| 12 | 3 | __PACKAGE__->add_columns( | |
| 13 | 'movie_info_id' => { data_type => 'integer', is_nullable => 0 }, | ||
| 14 | 'mrl' => { data_type => 'text', is_nullable => 0 }, | ||
| 15 | 'duration' => { data_type => 'integer', is_nullable => 0 }, | ||
| 16 | 'file_size' => { data_type => 'integer', is_nullable => 1 }, | ||
| 17 | 'title' => { 'data_type' => 'text', 'is_nullable' => 1 }, | ||
| 18 | ); | ||
| 19 | |||
| 20 | 3 | __PACKAGE__->set_primary_key('movie_info_id'); | |
| 21 | |||
| 22 | 3 | __PACKAGE__->add_unique_constraint(['mrl']); | |
| 23 | |||
| 24 | 3 | __PACKAGE__->has_many( | |
| 25 | 'schedule_entries', | ||
| 26 | 'Video::PlaybackMachine::Schema::Result::ScheduleEntry', | ||
| 27 | { 'foreign.mrl' => 'self.mrl' } | ||
| 28 | ); | ||
| 29 | |||
| 30 | 3 | 1; | |