| 1 | 2 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | |||
| 3 | package Interchange6::Schema::Result::OrderStatus; | ||
| 4 | |||
| 5 | =head1 NAME | ||
| 6 | |||
| 7 | Interchange6::Schema::Result::OrderStatus | ||
| 8 | |||
| 9 | =cut | ||
| 10 | |||
| 11 | 2 | use Interchange6::Schema::Candy -components => | |
| 12 | 2 | ▶ | [qw(InflateColumn::DateTime TimeStamp)]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | =head1 ACCESSORS | ||
| 15 | |||
| 16 | =head2 order_status_id | ||
| 17 | |||
| 18 | Primary key. | ||
| 19 | |||
| 20 | =cut | ||
| 21 | |||
| 22 | 2 | primary_column order_status_id => { | |
| 23 | data_type => "integer", | ||
| 24 | is_auto_increment => 1, | ||
| 25 | sequence => "order_status_id_seq", | ||
| 26 | }; | ||
| 27 | |||
| 28 | =head2 orders_id | ||
| 29 | |||
| 30 | FK on L<Interchange6::Schema::Result::Order/orders_id>. | ||
| 31 | |||
| 32 | =cut | ||
| 33 | |||
| 34 | 2 | column orders_id => { data_type => "integer" }; | |
| 35 | |||
| 36 | =head2 status | ||
| 37 | |||
| 38 | Status of the order, e.g.: picking, complete, shipped, cancelled | ||
| 39 | |||
| 40 | =cut | ||
| 41 | |||
| 42 | 2 | column status => { data_type => "varchar", size => 32 }; | |
| 43 | |||
| 44 | =head2 created | ||
| 45 | |||
| 46 | Date and time when this record was created returned as L<DateTime> object. | ||
| 47 | Value is auto-set on insert. | ||
| 48 | |||
| 49 | =cut | ||
| 50 | |||
| 51 | 2 | column created => { data_type => "datetime", set_on_create => 1 }; | |
| 52 | |||
| 53 | =head1 RELATIONS | ||
| 54 | |||
| 55 | =head2 order | ||
| 56 | |||
| 57 | Type: belongs_to | ||
| 58 | |||
| 59 | Related object: L<Interchange6::Schema::Result::Order> | ||
| 60 | |||
| 61 | =cut | ||
| 62 | |||
| 63 | 2 | belongs_to order => "Interchange6::Schema::Result::Order", "orders_id"; | |
| 64 | |||
| 65 | 2 | 1; | |