| 1 | # | ||
| 2 | # This file is part of CatalystX-ExtJS | ||
| 3 | # | ||
| 4 | # This software is Copyright (c) 2011 by Moritz Onken. | ||
| 5 | # | ||
| 6 | # This is free software, licensed under: | ||
| 7 | # | ||
| 8 | # The (three-clause) BSD License | ||
| 9 | # | ||
| 10 | package MyApp::Schema::Result; | ||
| 11 | |||
| 12 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 1 | extends 'DBIx::Class'; | |
| 14 | |||
| 15 | 1 | __PACKAGE__->load_components(qw(RandomColumns TimeStamp Core)); | |
| 16 | |||
| 17 | 1 | __PACKAGE__->table('foo'); | |
| 18 | |||
| 19 | 1 | __PACKAGE__->add_columns( | |
| 20 | id => { | ||
| 21 | data_type => 'character', | ||
| 22 | is_random => {size => 8, set => ['A'..'Z', 0..9]}, | ||
| 23 | size => 10, | ||
| 24 | }, | ||
| 25 | created_on => { | ||
| 26 | data_type => 'timestamp with time zone', | ||
| 27 | set_on_create => 1 | ||
| 28 | }, | ||
| 29 | updated_on => { | ||
| 30 | data_type => 'timestamp with time zone', | ||
| 31 | set_on_create => 1, | ||
| 32 | set_on_update => 1 | ||
| 33 | }); | ||
| 34 | |||
| 35 | 1 | __PACKAGE__->set_primary_key('id'); | |
| 36 | |||
| 37 | 1 | 1; | |