阶段性更新

This commit is contained in:
2020-10-13 08:49:57 +08:00
parent 7cfd45bf99
commit d8cd8ae9a6
21 changed files with 420 additions and 423 deletions

View File

@@ -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();
}
}