| 1 | 2 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | |||
| 3 | package AproJo::DB::Schema::Result::TimeEntry; | ||
| 4 | |||
| 5 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 2 | ▶ | use base 'DBIx::Class::Core'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 2 | __PACKAGE__->table('time_entries'); | |
| 11 | |||
| 12 | 2 | __PACKAGE__->add_columns( | |
| 13 | 'time_entry_id', | ||
| 14 | {data_type => 'integer', is_auto_increment => 1, is_nullable => 0}, | ||
| 15 | 'start', | ||
| 16 | { | ||
| 17 | data_type => 'datetime', | ||
| 18 | datetime_undef_if_invalid => 1, | ||
| 19 | default_value => '1900-01-01 00:00:00', | ||
| 20 | is_nullable => 0, | ||
| 21 | }, | ||
| 22 | 'end', | ||
| 23 | { | ||
| 24 | data_type => 'datetime', | ||
| 25 | datetime_undef_if_invalid => 1, | ||
| 26 | default_value => '1900-01-01 00:00:00', | ||
| 27 | is_nullable => 0, | ||
| 28 | }, | ||
| 29 | 'duration', | ||
| 30 | {data_type => 'integer', default_value => 0, is_nullable => 0}, | ||
| 31 | 'user_id', | ||
| 32 | {data_type => 'integer', is_nullable => 0, is_foreign_key => 1}, | ||
| 33 | 'order_id', | ||
| 34 | {data_type => 'integer', is_nullable => 0, is_foreign_key => 1}, | ||
| 35 | 'orderitem_id', | ||
| 36 | {data_type => 'integer', is_nullable => 0, is_foreign_key => 1}, | ||
| 37 | 'description', | ||
| 38 | {data_type => 'text', default_value => '', is_nullable => 1}, | ||
| 39 | 'comment', | ||
| 40 | {data_type => 'text', default_value => '', is_nullable => 1}, | ||
| 41 | 'comment_type', | ||
| 42 | {data_type => 'tinyint', default_value => 0, is_nullable => 0}, | ||
| 43 | 'cleared', | ||
| 44 | {data_type => 'tinyint', default_value => 0, is_nullable => 0}, | ||
| 45 | 'location', | ||
| 46 | {data_type => 'varchar', default_value => '', is_nullable => 1, size => 50}, | ||
| 47 | 'approved', | ||
| 48 | {data_type => 'decimal', is_nullable => 1, size => [10, 2]}, | ||
| 49 | 'status_id', | ||
| 50 | {data_type => 'smallint', default_value => 0, is_nullable => 0, is_foreign_key => 1}, | ||
| 51 | 'billable', | ||
| 52 | {data_type => 'tinyint', default_value => 1, is_nullable => 1}, | ||
| 53 | ); | ||
| 54 | |||
| 55 | 2 | __PACKAGE__->set_primary_key('time_entry_id'); | |
| 56 | |||
| 57 | 2 | __PACKAGE__->has_one('orderitem', 'AproJo::DB::Schema::Result::Orderitem', | |
| 58 | 'orderitem_id'); | ||
| 59 | |||
| 60 | 2 | 1; | |