Total Complexity | 1 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class OrderDetail extends DataObject |
||
9 | { |
||
10 | /** |
||
11 | * @var array |
||
12 | */ |
||
13 | private static $db = array( |
||
|
|||
14 | 'Quantity' => 'Int', |
||
15 | 'Price' => 'Currency', |
||
16 | 'ProductName' => 'Varchar(255)', |
||
17 | 'ProductCode' => 'Varchar(100)', |
||
18 | 'ProductImage' => 'Text', |
||
19 | 'ProductCategory' => 'Varchar(100)', |
||
20 | ); |
||
21 | |||
22 | /** |
||
23 | * @var array |
||
24 | */ |
||
25 | private static $has_one = array( |
||
26 | 'Product' => SiteTree::class, |
||
27 | 'Order' => Order::class, |
||
28 | ); |
||
29 | |||
30 | /** |
||
31 | * @var array |
||
32 | */ |
||
33 | private static $has_many = array( |
||
34 | 'OrderOptions' => OrderOption::class, |
||
35 | ); |
||
36 | |||
37 | /** |
||
38 | * @var array |
||
39 | */ |
||
40 | private static $summary_fields = array( |
||
41 | 'Product.Title', |
||
42 | 'Quantity', |
||
43 | 'Price.Nice', |
||
44 | ); |
||
45 | |||
46 | /** |
||
47 | * @var string |
||
48 | */ |
||
49 | private static $table_name = 'FoxyOrderDetail'; |
||
50 | |||
51 | /** |
||
52 | * @return FieldList |
||
53 | */ |
||
54 | public function getCMSFields() |
||
61 |