| 1 | 2 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | |||
| 3 | package Interchange6::Schema::Result::OrderComment; | ||
| 4 | |||
| 5 | =head1 NAME | ||
| 6 | |||
| 7 | Interchange6::Schema::Result::OrderComment | ||
| 8 | |||
| 9 | =cut | ||
| 10 | |||
| 11 | 2 | ▶ | use Interchange6::Schema::Candy; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | =head1 DESCRIPTION | ||
| 14 | |||
| 15 | Link table between Order and Message for order comments. | ||
| 16 | |||
| 17 | =cut | ||
| 18 | |||
| 19 | =head1 ACCESSORS | ||
| 20 | |||
| 21 | =head2 messages_id | ||
| 22 | |||
| 23 | Foreign key constraint on L<Interchange6::Schema::Result::Message/messages_id> | ||
| 24 | via L</message> relationship. | ||
| 25 | |||
| 26 | =cut | ||
| 27 | |||
| 28 | 2 | column messages_id => { | |
| 29 | data_type => "integer", | ||
| 30 | }; | ||
| 31 | |||
| 32 | =head2 orders_id | ||
| 33 | |||
| 34 | Foreign key constraint on L<Interchange6::Schema::Result::Order/orders_id> | ||
| 35 | via L</order> relationship. | ||
| 36 | |||
| 37 | =cut | ||
| 38 | |||
| 39 | 2 | column orders_id => { | |
| 40 | data_type => "integer", | ||
| 41 | }; | ||
| 42 | |||
| 43 | =head1 PRIMARY KEY | ||
| 44 | |||
| 45 | =over 4 | ||
| 46 | |||
| 47 | =item * L</messages_id> | ||
| 48 | |||
| 49 | =item * L</orders_id> | ||
| 50 | |||
| 51 | =back | ||
| 52 | |||
| 53 | =cut | ||
| 54 | |||
| 55 | 2 | primary_key "messages_id", "orders_id"; | |
| 56 | |||
| 57 | =head1 RELATIONS | ||
| 58 | |||
| 59 | =head2 message | ||
| 60 | |||
| 61 | Type: belongs_to | ||
| 62 | |||
| 63 | Related object: L<Interchange6::Schema::Result::Message> | ||
| 64 | |||
| 65 | =cut | ||
| 66 | |||
| 67 | 2 | belongs_to | |
| 68 | message => "Interchange6::Schema::Result::Message", | ||
| 69 | "messages_id", | ||
| 70 | { cascade_delete => 1 }; | ||
| 71 | |||
| 72 | =head2 order | ||
| 73 | |||
| 74 | Type: belongs_to | ||
| 75 | |||
| 76 | Related object: L<Interchange6::Schema::Result::Order> | ||
| 77 | |||
| 78 | =cut | ||
| 79 | |||
| 80 | 2 | belongs_to | |
| 81 | order => "Interchange6::Schema::Result::Order", | ||
| 82 | "orders_id"; | ||
| 83 | |||
| 84 | 2 | 1; | |