| 1 | 2 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | |||
| 3 | package Interchange6::Schema::Result::Session; | ||
| 4 | |||
| 5 | =head1 NAME | ||
| 6 | |||
| 7 | Interchange6::Schema::Result::Session | ||
| 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 sessions_id | ||
| 17 | |||
| 18 | Primary key. | ||
| 19 | |||
| 20 | =cut | ||
| 21 | |||
| 22 | 2 | primary_column sessions_id => | |
| 23 | { data_type => "varchar", size => 255 }; | ||
| 24 | |||
| 25 | =head2 session_data | ||
| 26 | |||
| 27 | Session data. | ||
| 28 | |||
| 29 | =cut | ||
| 30 | |||
| 31 | 2 | column session_data => { data_type => "text" }; | |
| 32 | |||
| 33 | =head2 created | ||
| 34 | |||
| 35 | Date and time when this record was created returned as L<DateTime> object. | ||
| 36 | Value is auto-set on insert. | ||
| 37 | |||
| 38 | =cut | ||
| 39 | |||
| 40 | 2 | column created => | |
| 41 | { data_type => "datetime", set_on_create => 1 }; | ||
| 42 | |||
| 43 | =head2 last_modified | ||
| 44 | |||
| 45 | Date and time when this record was last modified returned as L<DateTime> object. | ||
| 46 | Value is auto-set on insert and update. | ||
| 47 | |||
| 48 | =cut | ||
| 49 | |||
| 50 | 2 | column last_modified => { | |
| 51 | data_type => "datetime", | ||
| 52 | set_on_create => 1, | ||
| 53 | set_on_update => 1, | ||
| 54 | }; | ||
| 55 | |||
| 56 | =head1 RELATIONS | ||
| 57 | |||
| 58 | =head2 carts | ||
| 59 | |||
| 60 | Type: has_many | ||
| 61 | |||
| 62 | Related object: L<Interchange6::Schema::Result::Cart> | ||
| 63 | |||
| 64 | =cut | ||
| 65 | |||
| 66 | 2 | has_many | |
| 67 | carts => "Interchange6::Schema::Result::Cart", | ||
| 68 | "sessions_id", | ||
| 69 | { cascade_copy => 0, cascade_delete => 0 }; | ||
| 70 | |||
| 71 | =head2 payment_orders | ||
| 72 | |||
| 73 | Type: has_many | ||
| 74 | |||
| 75 | Related object: L<Interchange6::Schema::Result::PaymentOrder> | ||
| 76 | |||
| 77 | =cut | ||
| 78 | |||
| 79 | 2 | has_many | |
| 80 | payment_orders => "Interchange6::Schema::Result::PaymentOrder", | ||
| 81 | "sessions_id", | ||
| 82 | { cascade_copy => 0, cascade_delete => 0 }; | ||
| 83 | |||
| 84 | 2 | 1; | |