| 1 | package Finance::QuoteDB::Schema::Quote; | ||
| 2 | 1 | ▶ | use base qw/DBIx::Class/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | |||
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 1 | __PACKAGE__->load_components(qw/ PK::Auto Core /); | |
| 8 | 1 | __PACKAGE__->table('quote'); | |
| 9 | 1 | __PACKAGE__->add_columns ( symbolID=> { data_type=>'varchar', | |
| 10 | size=>20, | ||
| 11 | is_nullable=>0, | ||
| 12 | is_auto_increment=>0, | ||
| 13 | default_value=>'' | ||
| 14 | }, | ||
| 15 | date=> { data_type=>'date', | ||
| 16 | is_nullable=>0, | ||
| 17 | is_auto_increment=>0, | ||
| 18 | default_value=>'' | ||
| 19 | }, | ||
| 20 | previous_close=> { data_type=>'float', | ||
| 21 | is_nullable=>1, | ||
| 22 | is_auto_increment=>0, | ||
| 23 | default_value=>0 | ||
| 24 | }, | ||
| 25 | day_open=> { data_type=>'float', | ||
| 26 | is_nullable=>1, | ||
| 27 | is_auto_increment=>0, | ||
| 28 | default_value=>0 | ||
| 29 | }, | ||
| 30 | day_high=> { data_type=>'float', | ||
| 31 | is_nullable=>1, | ||
| 32 | is_auto_increment=>0, | ||
| 33 | default_value=>0 | ||
| 34 | }, | ||
| 35 | day_low=> { data_type=>'float', | ||
| 36 | is_nullable=>1, | ||
| 37 | is_auto_increment=>0, | ||
| 38 | default_value=>0 | ||
| 39 | }, | ||
| 40 | day_close=> { data_type=>'float', | ||
| 41 | is_nullable=>1, | ||
| 42 | is_auto_increment=>0, | ||
| 43 | default_value=>0 | ||
| 44 | }, | ||
| 45 | bid=> { data_type=>'integer', | ||
| 46 | is_nullable=>1, | ||
| 47 | is_auto_increment=>0, | ||
| 48 | default_value=>0 | ||
| 49 | }, | ||
| 50 | ask=> { data_type=>'integer', | ||
| 51 | is_nullable=>1, | ||
| 52 | is_auto_increment=>0, | ||
| 53 | default_value=>0 | ||
| 54 | }, | ||
| 55 | volume=> { data_type=>'integer', | ||
| 56 | is_nullable=>1, | ||
| 57 | is_auto_increment=>0, | ||
| 58 | default_value=>0 | ||
| 59 | } | ||
| 60 | ); | ||
| 61 | |||
| 62 | 1 | __PACKAGE__->set_primary_key(qw / symbolID date /); | |
| 63 | 1 | __PACKAGE__->belongs_to('symbolID'=>'Finance::QuoteDB::Schema::Symbol'); | |
| 64 | |||
| 65 | =head1 COPYRIGHT & LICENSE | ||
| 66 | |||
| 67 | Copyright 2008-2011 Erik Colson, all rights reserved. | ||
| 68 | |||
| 69 | This file is part of Finance::QuoteDB. | ||
| 70 | |||
| 71 | Finance::QuoteDB is free software: you can redistribute it and/or | ||
| 72 | modify it under the terms of the GNU General Public License as | ||
| 73 | published by the Free Software Foundation, either version 3 of the | ||
| 74 | License, or (at your option) any later version. | ||
| 75 | |||
| 76 | Finance::QuoteDB is distributed in the hope that it will be useful, | ||
| 77 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 78 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 79 | General Public License for more details. | ||
| 80 | |||
| 81 | You should have received a copy of the GNU General Public License | ||
| 82 | along with Finance::QuoteDB. If not, see | ||
| 83 | <http://www.gnu.org/licenses/>. | ||
| 84 | |||
| 85 | =cut | ||
| 86 | |||
| 87 | 1 | 1; | |