initial commit
[namibia] / module / Valuation / src / Valuation / DataBin / ValuationAppointments.php
1 <?php
2
3 namespace Valuation\DataBin;
4
5 /**
6  * Manage Valuation Appointments data.
7  * @author andre.fourie
8  */
9 class ValuationAppointments extends \Workspace\Service\DataBin
10 {
11
12   /**
13    * @var array
14    */
15   protected $meta = array(
16     'Base' => 'ValuationAppointments',
17     'DatasetName' => 'valuationAppointments',
18     'Entity' => '\Valuation\Entity\ValuationAppointments',
19     'References' => array(
20       'timeSlot' => '\Valuation\Entity\ValuationTimeSlots',
21       'valuator' => '\Valuation\Entity\ValuationValuators',
22       'valuation' => '\Valuation\Entity\Valuation',
23     ),
24     'Dependants' => array()
25   );
26
27   /**
28    * @var array
29    */
30   protected $metaList = array(
31     'Contract' => 'Recurring',
32     'RequireAuth' => true,
33     'RequiredInput' => array(),
34     'OptionalInput' => array(
35       'Filter' => array(
36         'created' => 'Date',
37         'updated' => 'Date',
38         'appointmentDate' => 'Date',
39         'timeSlot' => 'Id',
40         'valuator' => 'Id',
41         'valuation' => 'Id',
42           'appointmentDate' => 'Date',
43       )
44     ),
45     'Filter' => array(),
46     'Fields' => array(
47       'appointmentDate',
48       'timeSlot',
49       'valuator',
50       'valuation'
51     ),
52     'Expand' => array()
53   );
54
55   /**
56    * @var array
57    */
58   protected $metaCreate = array(
59     'Type' => 'Create',
60     'Contract' => 'Recurring',
61     'Flags' => array(),
62       'Expand'   => array(
63           'timeSlot',
64           'valuator',
65           'valuation',
66 //          'category',
67 //          'make',
68 //          'model',
69 //          'type',
70 //          'stock'
71       ),
72     'RelatedEntityFromInput' => array(
73         'TimeSlot' => array(
74             'Workflow' => '\Valuation\Workflow',
75             'Service' => '\Valuation\Service\ValuationTimeSlots',
76             'Field' => 'timeSlot'
77         ),
78         'Valuator' => array(
79             'Workflow' => '\Valuation\Workflow',
80             'Service' => '\Valuation\Service\ValuationValuators',
81             'Field' => 'valuator'
82         ),
83         'Valuation' => array(
84             'Workflow' => '\Valuation\Workflow',
85             'Service' => '\Valuation\Service\Valuation',
86             'Field' => 'valuation'
87           )
88     ),
89     'RequiredInput' => array(
90       'ValuationAppointments' => array(
91         'appointmentDate' => 'DateTime'
92       ),
93     ),
94     'OptionalInput' => array(
95         'ValuationAppointments' => array(
96             'appointmentCancelled' => 'Boolean',
97             'appointmentCancelledComments' => 'String500',
98             'appointmentCompleted' => 'Boolean',
99             'timeSlot' => 'Id'
100         ),
101         'Valuation' => array(
102             'email'                     => 'String250',
103             'firstName'                 => 'String50',
104             'familyName'                => 'String50',
105             'mobile'                    => 'Mobile',
106             'customerAddressStreet'     => 'String150',
107             'customerAddressStreetName' => 'String150',
108             'customerAddressSuburb'     => 'String150',
109             'customerAddressCity'       => 'String150',
110             'customerAddressPostalCode' => 'String150',
111         ),
112     )
113   );
114
115   /**
116    * @var array
117    */
118   protected $metaUpdate = array(
119     'Type' => 'Update',
120     'Contract' => 'UseOnce',
121       'RequireAuth' => true,
122       'ExecuteAfter' => array(
123           'updateSendCustomerEmail'
124       ),
125       'Expand'   => array(
126           'timeSlot',
127           'valuator',
128           'valuation',
129           'stock'
130       ),
131       'RelatedEntityFromInput' => array(
132           'Valuation' => array(
133               'Workflow' => '\Valuation\Workflow',
134               'Service' => '\Valuation\Service\Valuation',
135               'Field' => 'valuation'
136           )
137       ),
138       'RequiredInput' => array(
139           'ValuationAppointments' => array(
140               'appointmentDate' => 'DateTime'
141           )
142       ),
143       'OptionalInput' => array(
144           'ValuationAppointments' => array(
145               'appointmentCancelled' => 'Boolean',
146               'appointmentCancelledComments' => 'String500',
147               'appointmentCompleted' => 'Boolean',
148               'timeSlot' => 'Id'
149           ),
150           'Valuation' => array(
151               'email'                     => 'String250',
152               'firstName'                 => 'String50',
153               'familyName'                => 'String50',
154               'mobile'                    => 'Mobile',
155               'customerAddressStreet'     => 'String150',
156               'customerAddressStreetName' => 'String150',
157               'customerAddressSuburb'     => 'String150',
158               'customerAddressCity'       => 'String150',
159               'customerAddressPostalCode' => 'String150',
160           ),
161       )
162   );
163
164
165   /**
166    * @var array
167    */
168   protected $metaDelete = array(
169     'Contract' => 'UseOnce',
170     'RequireAuth' => true
171   );
172
173
174
175   /**
176    * Dynamic filtering.
177    */
178   public function __construct()
179   {
180
181   }
182
183 }