initial commit
[namibia] / module / Stock / src / Stock / DataBin / PricingHistory.php
1 <?php
2 namespace Stock\DataBin;
3
4 /**
5  * Manage Pricing History data.
6  * @author Andre.b
7  */
8 class PricingHistory extends \Workspace\Service\DataBin
9 {
10
11         /**
12          * @var array
13          */
14         protected $meta = array(
15                         'Base'        => 'PricingHistory',
16                         'DatasetName' => 'pricinghistory',
17                         'Entity'      => '\Stock\Entity\PricingHistory',
18                         'References'  => array(),
19                         'Dependants'  => array()
20         );
21         /**
22          * @var array
23         */
24         protected $metaGrid = array(
25             'Type'          => 'Grid',
26                 'Export'        => false,
27             'Contract'      => 'Recurring',
28                 'Options'       => array(),
29             'RequiredInput' => array(),
30             'OptionalInput' => array(
31                 'Grid'  => array(
32                     'NumberOfRecords' => 'Integer',
33                                 'Filter'          => 'Array'
34                  )
35             ),
36                 'Base'            => 'PricingHistory',
37             'NumberOfRecords' => 10,
38         'Query'           => 'SELECT [SELECTION]
39                                               FROM \Stock\Entity\PricingHistory PricingHistory
40                                                           [WHERE] [ORDER]',
41             'Selection'       => 'PricingHistory',
42                 'Filter'          => array(),
43             'OrderBy'         => array('PricingHistory.date' => 'DESC'),
44             'Fields'          => array(
45                                                         'id',
46                                                     'date' => 'DateTime',
47                                                 'trade',
48                                                 'totalRecon',
49                                             'km',
50                                                     'pricegOffer',
51                                                     'auctionWinningBid',
52                                                         'stockId'
53                         )
54         );
55 }