优化抽奖方式,以及记录相关信息
This commit is contained in:
@@ -32,6 +32,7 @@ use app\dice\model\lottery_pool_config\DiceLotteryPoolConfig;
|
||||
* @property $total_ticket_count 总抽奖次数
|
||||
* @property $paid_ticket_count 购买抽奖次数
|
||||
* @property $free_ticket_count 赠送抽奖次数
|
||||
* @property array|null $free_ticket 免费抽奖券:{"ante":1,"count":1}
|
||||
* @property $create_time 创建时间
|
||||
* @property $update_time 更新时间
|
||||
* @property $delete_time 删除时间
|
||||
@@ -54,6 +55,10 @@ class DicePlayer extends BaseModel
|
||||
|
||||
protected $updateTime = 'update_time';
|
||||
|
||||
protected $json = ['free_ticket'];
|
||||
|
||||
protected $jsonAssoc = true;
|
||||
|
||||
/**
|
||||
* 新增前:生成唯一 uid,昵称 name 默认使用 uid
|
||||
* 用 try-catch 避免表尚未含 uid 时 getAttr/getData 抛 InvalidArgumentException
|
||||
|
||||
Reference in New Issue
Block a user