line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package AproJo::DB::Schema::Result::Article; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
1347
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
68
|
|
4
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
66
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
10
|
use base 'DBIx::Class::Core'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
399
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
__PACKAGE__->table('articles'); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
__PACKAGE__->add_columns( |
11
|
|
|
|
|
|
|
'article_id', |
12
|
|
|
|
|
|
|
{data_type => 'integer', is_auto_increment => 1, is_nullable => 0}, |
13
|
|
|
|
|
|
|
'description_short', |
14
|
|
|
|
|
|
|
{data_type => 'varchar', default_value => '', is_nullable => 0, size => 50}, |
15
|
|
|
|
|
|
|
'description_long', |
16
|
|
|
|
|
|
|
{data_type => 'varchar', default_value => '', is_nullable => 1, size => 255}, |
17
|
|
|
|
|
|
|
'unit_id', |
18
|
|
|
|
|
|
|
{ |
19
|
|
|
|
|
|
|
data_type => 'integer', |
20
|
|
|
|
|
|
|
default_value => 1, |
21
|
|
|
|
|
|
|
is_nullable => 0, |
22
|
|
|
|
|
|
|
is_foreign_key => 1 |
23
|
|
|
|
|
|
|
}, |
24
|
|
|
|
|
|
|
'price', |
25
|
|
|
|
|
|
|
{ |
26
|
|
|
|
|
|
|
data_type => 'decimal', |
27
|
|
|
|
|
|
|
default_value => '0.00', |
28
|
|
|
|
|
|
|
is_nullable => 0, |
29
|
|
|
|
|
|
|
size => [10, 2], |
30
|
|
|
|
|
|
|
}, |
31
|
|
|
|
|
|
|
'timeable', |
32
|
|
|
|
|
|
|
{data_type => 'tinyint', default_value => 0, is_nullable => 1}, |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__PACKAGE__->set_primary_key('article_id'); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__PACKAGE__->belongs_to( |
38
|
|
|
|
|
|
|
'unit' => 'AproJo::DB::Schema::Result::Unit', |
39
|
|
|
|
|
|
|
'unit_id' |
40
|
|
|
|
|
|
|
); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |