Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 228
0.00% covered (danger)
0.00%
0 / 49
CRAP
0.00% covered (danger)
0.00%
0 / 1
LoyaltyTrigger
0.00% covered (danger)
0.00%
0 / 228
0.00% covered (danger)
0.00%
0 / 49
7832
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 32
0.00% covered (danger)
0.00%
0 / 1
30
 create
0.00% covered (danger)
0.00%
0 / 33
0.00% covered (danger)
0.00%
0 / 1
30
 update
0.00% covered (danger)
0.00%
0 / 27
0.00% covered (danger)
0.00%
0 / 1
20
 deleteTrigger
0.00% covered (danger)
0.00%
0 / 8
0.00% covered (danger)
0.00%
0 / 1
20
 getReadableDetails
0.00% covered (danger)
0.00%
0 / 84
0.00% covered (danger)
0.00%
0 / 1
702
 getGroupID
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setGroupID
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getStoresArray
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setStoresArray
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getDb
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setDb
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getTriggerId
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setTriggerId
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getStoreGroup
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setStoreGroup
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getType
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setType
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getCouponID
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setCouponID
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getExpireDate
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setExpireDate
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getTimeframe
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setTimeframe
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getTimeRandom
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setTimeRandom
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getAlertFrom
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setAlertFrom
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getSendType
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setSendType
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getDays
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setDays
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getCustomerType
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setCustomerType
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getEvent
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setEvent
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getMessageID
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setMessageID
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getShortName
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setShortName
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getCoupon
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setCoupon
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getMessage
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setMessage
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getBuyerRating
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setBuyerRating
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getIncludeNoRatings
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setIncludeNoRatings
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getTypeNum
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setTypeNum
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace BuyerKiosk\Core\Loyalty;
4
5class LoyaltyTrigger extends LoyaltyGroup
6{
7    private $db;
8    public $triggerID;
9    public $shortName;
10    public $storeGroup;
11    public $typeNum;
12    // The coupon to send with this trigger
13    public $couponID;
14    ///////////////////////////
15    // type is the Coupon Type. Each type has its own set of rules  //
16    // 0: Days Since X (event)
17    //      - customerType specifies whether customer is NEW/RETURN or BOTH
18    //      - event
19    //          -'last_visit_store'
20    //          -'last_visit_storeGroup'
21    //          -'joined'
22    // 1: Birthday
23    //      - days is how many days before birthday to message customer
24    // 2: Expire Points
25    //      - days is how many days before expiration to message customer
26    // 3: Buyer Last Sold
27    //      - days is how many days since the buyer last sold
28    ///////////////////////////
29    public $type;
30    ///////////////////////////
31    // expireDate specifies when the trigger should expire  //
32    // if set to NULL than it does not expire
33    ///////////////////////////
34    public $expireDate;
35    ///////////////////////////
36    // timeframe is the time where the text should be sent during the day //
37    // 0 = Random
38    // 1 = 10am local time
39    // 2 = 12pm local time
40    // 3 = 2pm local time
41    // 4 = 4pm local time
42    // 5 = 6pm local time
43    // 6 = 8pm local time
44    ///////////////////////////
45    public $timeframe;
46    public $timeRandom;
47    ///////////////////////////
48    // alertFrom specifies where the text should originate from  //
49    // 0 = Origin Store
50    // 1 = Last Visited Store
51    // 2 = Most Visited Store
52    // 3 = Co-op
53    ///////////////////////////
54    public $alertFrom;
55    ///////////////////////////
56    // sendType specifies what type of message to send  //
57    // 0 = SMS
58    // 1 = Email
59    // 2 = Push (in the future)
60    ///////////////////////////
61    public $sendType;
62    //Specifies the days before the event (depending on type -see above) to message customer
63    public $days;
64    ///////////////////////////
65    // The type of customer we want to find
66    // 0: New Customers only
67    // 1: Returning Customers Only
68    // 2: Both New and Returning Customers
69    ///////////////////////////////////////
70    public $customerType;
71    ///////////////////////////////////////
72    // event is the type of event for type 0 - see above
73    // 'last_visit_store' - Since this customer visited a specific store
74    // 'last_visit_storeGroup' - Since this customer visited a storeGroup
75    // 'joined' - Since this customer joined the rewards program
76    ///////////////////////////////////////
77    public $event;
78    ///////////////////////////////////////
79    // Buyer Rating is the minimum rating for the buyer in order to activate the trigger
80    ///////////////////////////////////////
81    public $buyerRating;
82    ///////////////////////////////////////
83    // Should we include buyers who have no ratings yet?
84    // 0: No
85    // 1: Yes
86    ///////////////////////////////////////
87    public $includeNoRatings;
88
89    public $messageID;
90
91    public $coupon;
92
93    public $message;
94
95    public $readableDetails;
96
97    public $active;
98
99    public function __construct($groupID = null, $typeNum = null, $id = null)
100    {
101
102        global $db_name;
103        $this->db = dbConnectByName($db_name);
104        //Make sure we have a valid storeGroup
105        if (parent::__construct($groupID, $typeNum)) {
106            $this->storeGroup = $this->groupID;
107        }
108        //If we already know the Trigger ID than we can pull it from the database
109        if (isset($id)) {
110            $stmt = $this->db->query("SELECT * FROM loyaltyTriggers WHERE id = " . $id);
111            $row = $stmt->fetch(\PDO::FETCH_ASSOC);
112            //Check to make sure we have a valid triggerID
113            if (isset($row['id'])) {
114                parent::__construct($row['storeGroup']);
115
116                $this->triggerID = $row['id'];
117                $this->typeNum = $row['typeNum'];
118                $this->shortName = $row['shortName'];
119                $this->type = $row['type'];
120                $this->couponID = $row['couponID'];
121                $this->timeframe = $row['timeframe'];
122                $this->alertFrom = $row['alertFrom'];
123                $this->sendType = $row['sendType'];
124                $this->days = $row['daysBeforeTrigger'];
125                $this->customerType = $row['customerType'];
126                $this->event = $row['event'];
127                $this->messageID = $row['messageID'];
128                $this->buyerRating = $row['buyerRating'];
129                $this->includeNoRatings = $row['includeNoRatings'];
130                $this->timeRandom = $row['timeRandom'];
131                $this->storeGroup = $row['storeGroup'];
132                $this->active = $row['active'];
133                $this->coupon = new LoyaltyCoupon($this->storeGroup, null, $row['couponID']);
134                if ($this->sendType == 0) {
135                    $this->message = new LoyaltySMSMessage($this->getStoreGroup(), null, $this->messageID);
136                }
137                //Get ExpireDate as a PHP DateTime object
138                $this->expireDate = new \DateTime($row['expireDate'], new \DateTimeZone('utc'));
139                return true;
140            }
141        }
142        return false;
143    }
144
145    public function create()
146    {
147        $this->db->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
148        $this->db->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);
149        try {
150            $stmt = $this->db->prepare("INSERT INTO loyaltyTriggers (storeGroup, typeNum, shortName, type, couponID, expireDate, timeframe, alertFrom, sendType, daysBeforeTrigger, customerType, event, messageID, buyerRating, includeNoRatings, timeRandom, active)
151            VALUES (:storeGroup, :typeNum, :shortName, :type, :couponID, :expireDate, :timeframe, :alertFrom, :sendType, :daysBeforeTrigger, :customerType, :event, :messageID, :buyerRating, :includeNoRatings, :timeRandom, :active)");
152            //Convert PHP Datetime object into a MYSQL date() string
153            if (isset($this->expireDate)) {
154                $expireDate = $this->expireDate->format('Y-m-d');
155            } else {
156                $expireDate = null;
157            }
158            if ($this->active == null) {
159                $this->active = 1;
160            }
161            $stmt->bindParam(":storeGroup", $this->storeGroup);
162            $stmt->bindParam(":typeNum", $this->typeNum);
163            $stmt->bindParam(":shortName", $this->shortName);
164            $stmt->bindParam(":type", $this->type);
165            $stmt->bindParam(":couponID", $this->couponID);
166            $stmt->bindParam(":expireDate", $expireDate);
167            $stmt->bindParam(":timeframe", $this->timeframe);
168            $stmt->bindParam(":alertFrom", $this->alertFrom);
169            $stmt->bindParam(":sendType", $this->sendType);
170            $stmt->bindParam(":daysBeforeTrigger", $this->days);
171            $stmt->bindParam(":customerType", $this->customerType);
172            $stmt->bindParam(":event", $this->event);
173            $stmt->bindParam(":messageID", $this->messageID);
174            $stmt->bindParam(":buyerRating", $this->buyerRating);
175            $stmt->bindParam(":includeNoRatings", $this->includeNoRatings);
176            $stmt->bindParam(":timeRandom", $this->timeRandom);
177            $stmt->bindParam(":active", $this->active);
178            if ($stmt->execute()) {
179                $this->triggerID = $this->db->lastInsertId();
180                return true;
181            }
182        } catch (\PDOException $e) {
183            error_log($e->getMessage());
184            return false;
185        }
186        return false;
187    }
188
189    public function update()
190    {
191        if (isset($this->triggerID)) {
192            try {
193                $stmt = $this->db->prepare("UPDATE kiosk_main.loyaltyTriggers
194SET storeGroup = :storeGroup, typeNum = :typeNum, shortName = :shortName, type = :type, couponID = :couponID, expireDate = :expireDate, timeframe = :timeframe,
195  alertFrom    = :alertFrom, sendType = :sendType, daysBeforeTrigger = :daysBeforeTrigger, customerType = :customerType,
196  event        = :event, messageID = :messageID, buyerRating = :buyerRating, includeNoRatings = :includeNoRatings, timeRandom = :timeRandom, active = :active
197WHERE id = :id");
198                //Convert PHP Datetime object into a MYSQL date() string
199                $expireDate = $this->expireDate->format('Y-m-d');
200
201                $stmt->bindParam(":storeGroup", $this->storeGroup);
202                $stmt->bindParam(":typeNum", $this->typeNum);
203                $stmt->bindParam(":shortName", $this->shortName);
204                $stmt->bindParam(":type", $this->type);
205                $stmt->bindParam(":couponID", $this->couponID);
206                $stmt->bindParam(":expireDate", $expireDate);
207                $stmt->bindParam(":timeframe", $this->timeframe);
208                $stmt->bindParam(":alertFrom", $this->alertFrom);
209                $stmt->bindParam(":sendType", $this->sendType);
210                $stmt->bindParam(":daysBeforeTrigger", $this->days);
211                $stmt->bindParam(":customerType", $this->customerType);
212                $stmt->bindParam(":event", $this->event);
213                $stmt->bindParam(":messageID", $this->messageID);
214                $stmt->bindParam(":buyerRating", $this->buyerRating);
215                $stmt->bindParam(":includeNoRatings", $this->includeNoRatings);
216                $stmt->bindParam(":timeRandom", $this->timeRandom);
217                $stmt->bindParam(":active", $this->active);
218                $stmt->bindParam(":id", $this->triggerID);
219                if ($stmt->execute()) {
220                    return true;
221                }
222            } catch (\PDOException $e) {
223                return false;
224            }
225        }
226        return false;
227    }
228
229    public function deleteTrigger()
230    {
231        if (isset($this->triggerID)) {
232            try {
233                $stmt = $this->db->prepare("UPDATE loyaltyTriggers SET deleted = 1 WHERE id = :id");
234                $stmt->bindParam(":id", $this->triggerID);
235                if ($stmt->execute()) {
236                    return true;
237                }
238            } catch (\PDOException $e) {
239                return false;
240            }
241        }
242        return false;
243    }
244
245    function getReadableDetails()
246    {
247        switch ($this->type) {
248            case 0:
249                $triggerType = "X Days Since X";
250                break;
251            case 1:
252                $triggerType = "Birthday";
253                break;
254            case 2:
255                $triggerType = "Expiring Points";
256                break;
257            default:
258                $triggerType = "Unknown";
259                break;
260        }
261        switch ($this->customerType) {
262            case 0:
263                $customerType = "New Customers Only";
264                break;
265            case 1:
266                $customerType = "Return Customers Only";
267                break;
268            case 2:
269                $customerType = "Both New AND Return";
270                break;
271            default:
272                $customerType = "Unknown";
273                break;
274        }
275        switch ($this->event) {
276            case 'last_visit_store':
277                $event = "Last Visit to Store";
278                break;
279            case 'last_visit_storeGroup':
280                $event = "Last Visit to Co-Op";
281                break;
282            case 'joined':
283                $event = "Since Joined Program";
284                break;
285            default:
286                $event = "Unknown";
287                break;
288        }
289        switch ($this->timeframe) {
290            case 0:
291                $timeFrame = "Random";
292                break;
293            case 1:
294                $timeFrame = "10am";
295                break;
296            case 2:
297                $timeFrame = "12pm";
298                break;
299            case 3:
300                $timeFrame = "2pm";
301                break;
302            case 4:
303                $timeFrame = "4pm";
304                break;
305            case 5:
306                $timeFrame = "6pm";
307                break;
308            case 6:
309                $timeFrame = "8pm";
310                break;
311            default:
312                $timeFrame = "Unknown";
313                break;
314        }
315        switch ($this->alertFrom) {
316            case 0:
317                $alertFrom = "SMS";
318                break;
319            case 1:
320                $alertFrom = "Email";
321                break;
322            case 2:
323                $alertFrom = "Push";
324                break;
325            default:
326                $alertFrom = "Unknown";
327                break;
328        }
329        if (isset($this->expireDate)) {
330            $expireDate = $this->expireDate->format('Y-m-d');
331        } else {
332            $expireDate = "None";
333        }
334
335        $tempArray = [
336            'triggerType' => $triggerType,
337            'customerType' => $customerType,
338            'event' => $event,
339            'timeFrame' => $timeFrame,
340            'alertFrom' => $alertFrom,
341            'expireDate' => $expireDate
342        ];
343        $this->readableDetails = $tempArray;
344    }
345
346    public function getGroupID()
347    {
348        return $this->groupID;
349    }
350
351    public function setGroupID($groupID)
352    {
353        $this->groupID = $groupID;
354    }
355
356    public function getStoresArray()
357    {
358        return $this->storesArray;
359    }
360
361    /**
362     * @param mixed $storesArray
363     */
364    public function setStoresArray($storesArray)
365    {
366        $this->storesArray = $storesArray;
367    }
368
369    /**
370     * @return mixed
371     */
372    public function getDb()
373    {
374        return $this->db;
375    }
376
377    /**
378     * @param mixed $db
379     */
380    public function setDb($db)
381    {
382        $this->db = $db;
383    }
384
385    /**
386     * @return mixed
387     */
388    public function getTriggerId()
389    {
390        return $this->triggerID;
391    }
392
393    /**
394     * @param mixed $id
395     */
396    public function setTriggerId($id)
397    {
398        $this->triggerID = $id;
399    }
400
401    /**
402     * @return mixed
403     */
404    public function getStoreGroup()
405    {
406        return $this->storeGroup;
407    }
408
409    /**
410     * @param mixed $storeGroup
411     */
412    public function setStoreGroup($storeGroup)
413    {
414        $this->storeGroup = $storeGroup;
415    }
416
417    /**
418     * @return mixed
419     */
420    public function getType()
421    {
422        return $this->type;
423    }
424
425    /**
426     * @param mixed $type
427     */
428    public function setType($type)
429    {
430        $this->type = $type;
431    }
432
433    /**
434     * @return mixed
435     */
436    public function getCouponID()
437    {
438        return $this->couponID;
439    }
440
441    /**
442     * @param mixed $couponID
443     */
444    public function setCouponID($couponID)
445    {
446        $this->couponID = $couponID;
447    }
448
449    /**
450     * @return mixed
451     */
452    public function getExpireDate()
453    {
454        return $this->expireDate;
455    }
456
457    /**
458     * @param mixed $expireDate
459     */
460    public function setExpireDate($expireDate)
461    {
462        $this->expireDate = $expireDate;
463    }
464
465    /**
466     * @return mixed
467     */
468    public function getTimeframe()
469    {
470        return $this->timeframe;
471    }
472
473    /**
474     * @param mixed $timeframe
475     */
476    public function setTimeframe($timeframe)
477    {
478        $this->timeframe = $timeframe;
479    }
480
481    /**
482     * @return mixed
483     */
484    public function getTimeRandom()
485    {
486        return $this->timeRandom;
487    }
488
489    /**
490     * @param mixed $timeRandom
491     */
492    public function setTimeRandom($timeRandom)
493    {
494        $this->timeRandom = $timeRandom;
495    }
496
497
498    /**
499     * @return mixed
500     */
501    public function getAlertFrom()
502    {
503        return $this->alertFrom;
504    }
505
506    /**
507     * @param mixed $alertFrom
508     */
509    public function setAlertFrom($alertFrom)
510    {
511        $this->alertFrom = $alertFrom;
512    }
513
514    /**
515     * @return mixed
516     */
517    public function getSendType()
518    {
519        return $this->sendType;
520    }
521
522    /**
523     * @param mixed $sendType
524     */
525    public function setSendType($sendType)
526    {
527        $this->sendType = $sendType;
528    }
529
530    /**
531     * @return mixed
532     */
533    public function getDays()
534    {
535        return $this->days;
536    }
537
538    /**
539     * @param mixed $days
540     */
541    public function setDays($days)
542    {
543        $this->days = $days;
544    }
545
546
547    /**
548     * @return mixed
549     */
550    public function getCustomerType()
551    {
552        return $this->customerType;
553    }
554
555    /**
556     * @param mixed $customerType
557     */
558    public function setCustomerType($customerType)
559    {
560        $this->customerType = $customerType;
561    }
562
563    /**
564     * @return mixed
565     */
566    public function getEvent()
567    {
568        return $this->event;
569    }
570
571    /**
572     * @param mixed $event
573     */
574    public function setEvent($event)
575    {
576        $this->event = $event;
577    }
578
579    /**
580     * @return mixed
581     */
582    public function getMessageID()
583    {
584        return $this->messageID;
585    }
586
587    /**
588     * @param mixed $messageID
589     */
590    public function setMessageID($messageID)
591    {
592        $this->messageID = $messageID;
593    }
594
595    /**
596     * @return mixed
597     */
598    public function getShortName()
599    {
600        return $this->shortName;
601    }
602
603    /**
604     * @param mixed $shortName
605     */
606    public function setShortName($shortName)
607    {
608        $this->shortName = $shortName;
609    }
610
611    /**
612     * @return LoyaltyCoupon
613     */
614    public function getCoupon()
615    {
616        return $this->coupon;
617    }
618
619    /**
620     * @param LoyaltyCoupon $coupon
621     */
622    public function setCoupon($coupon)
623    {
624        $this->coupon = $coupon;
625    }
626
627    /**
628     * @return mixed
629     */
630    public function getMessage()
631    {
632        return $this->message;
633    }
634
635    /**
636     * @param mixed $message
637     */
638    public function setMessage($message)
639    {
640        $this->message = $message;
641    }
642
643    /**
644     * @return mixed
645     */
646    public function getBuyerRating()
647    {
648        return $this->buyerRating;
649    }
650
651    /**
652     * @param mixed $buyerRating
653     */
654    public function setBuyerRating($buyerRating)
655    {
656        $this->buyerRating = $buyerRating;
657    }
658
659    /**
660     * @return mixed
661     */
662    public function getIncludeNoRatings()
663    {
664        return $this->includeNoRatings;
665    }
666
667    /**
668     * @param mixed $includeNoRatings
669     */
670    public function setIncludeNoRatings($includeNoRatings)
671    {
672        $this->includeNoRatings = $includeNoRatings;
673    }
674
675    /**
676     * @return mixed
677     */
678    public function getTypeNum()
679    {
680        return $this->typeNum;
681    }
682
683    /**
684     * @param mixed $typeNum
685     */
686    public function setTypeNum($typeNum)
687    {
688        $this->typeNum = $typeNum;
689    }
690
691
692}