47 lines
1.4 KiB
PHP
47 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace addons\webman\model;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class Game
|
|
* @property int id 主键
|
|
* @property int department_id 所属渠道id
|
|
* @property int game_id 所属游戏id
|
|
* @property int type 游戏类型
|
|
* @property string pic 奖品图片
|
|
* @property string name 奖品名称
|
|
* @property int probability 权重
|
|
* @property string description 奖品描述
|
|
* @property int total_stock 总库存
|
|
* @property int daily_stock 每日库存
|
|
* @property int total_remaining 当前总剩余库存
|
|
* @property int daily_remaining 当前每日剩余库存
|
|
* @property int status 是否启用
|
|
* @property int admin_id 管理员id
|
|
* @property string admin_name 管理员昵称
|
|
* @property string created_at 创建时间
|
|
* @property string updated_at 最后一次修改时间
|
|
*
|
|
* @property GamePlatform gamePlatform 游戏平台信息
|
|
* @package addons\webman\model
|
|
*/
|
|
class Prize extends Model
|
|
{
|
|
protected $table = 'prizes';
|
|
public $timestamps = false;
|
|
protected $fillable = [
|
|
'department_id', 'game_id', 'pic', 'type',
|
|
'name', 'total_stock', 'daily_stock',
|
|
'total_remaining', 'daily_remaining',
|
|
'probability', 'status', 'admin_id', 'admin_name'
|
|
];
|
|
|
|
const PRIZE_TYPE_PHYSICAL = 1; // 实物
|
|
const PRIZE_TYPE_VIRTUAL = 2; // 虚拟物品
|
|
const PRIZE_TYPE_LOSE = 3; // 未中奖
|
|
public static function findOrFail(int $prizeId)
|
|
{
|
|
}
|
|
} |