first commit
This commit is contained in:
30
autoload/front/factory/class.ShopCoupon.php
Normal file
30
autoload/front/factory/class.ShopCoupon.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
namespace front\factory;
|
||||
class ShopCoupon {
|
||||
private $id;
|
||||
private $name;
|
||||
private $status;
|
||||
private $type;
|
||||
private $amount;
|
||||
private $one_time;
|
||||
private $used;
|
||||
private $include_discounted_product;
|
||||
|
||||
public function __construct() {
|
||||
;
|
||||
}
|
||||
|
||||
public function __get( $var ) {
|
||||
return $this -> $var;
|
||||
}
|
||||
|
||||
public function __set( $var, $value ) {
|
||||
return $this -> $var = $value;
|
||||
}
|
||||
|
||||
public function set_as_used() {
|
||||
global $mdb;
|
||||
$mdb -> update( 'pp_shop_coupon', [ 'used' => 1, 'date_used' => date( 'Y-m-d H:i:s' ) ], [ 'id' => $this -> id ] );
|
||||
$this -> used = 1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user