阶段性更新
This commit is contained in:
@@ -64,4 +64,26 @@ class ActivityCoupon extends Model
|
||||
return $this->canRedemption();
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes: 是否可以撤销
|
||||
* @Author: 玄尘
|
||||
* @Date : 2020/10/12 11:57
|
||||
* @return bool
|
||||
*/
|
||||
public function canReversal()
|
||||
{
|
||||
return $this->status == self::STATUS_USED;
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes: 撤销
|
||||
* @Author: 玄尘
|
||||
* @Date : 2020/10/12 13:56
|
||||
*/
|
||||
public function reversal()
|
||||
{
|
||||
$this->status = self::STATUS_INIT;
|
||||
$this->save();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user