'department_id']; const STATUS_UNREVIEWED = 0; // 未审核 const STATUS_REJECT = 1; // 未通过 const STATUS_PASS = 2; // 通过 const STATUS_COMPLETE = 3; // 已完成 public function __construct(array $attributes = []) { parent::__construct($attributes); $this->setTable(plugin()->webman->config('database.player_lottery_record_table')); } /** * 渠道信息 * @return BelongsTo */ public function channel(): BelongsTo { return $this->belongsTo(plugin()->webman->config('database.channel_model'), 'department_id', 'department_id')->withTrashed(); } /** * 玩家信息 * @return BelongsTo */ public function player(): BelongsTo { return $this->belongsTo(plugin()->webman->config('database.player_model'), 'player_id')->withTrashed(); } /** * 机台信息 * @return BelongsTo */ public function machine(): BelongsTo { return $this->belongsTo(plugin()->webman->config('database.machine_model'), 'machine_id')->withTrashed(); } /** * 彩金信息 * @return BelongsTo */ public function lottery(): BelongsTo { return $this->belongsTo(plugin()->webman->config('database.lottery_model'), 'lottery_id')->withTrashed(); } /** * 派彩金额 * * @param $value * @return float */ public function getAmountAttribute($value): float { return floatval($value); } /** * 金额比例 * * @param $value * @return float */ public function getLotteryRateAttribute($value): float { return floatval($value); } /** * 派彩系数 * * @param $value * @return float */ public function getCateRateAttribute($value): float { return floatval($value); } /** * 派彩系数 * * @param $value * @return float */ public function getLotteryPoolAmountAttribute($value): float { return floatval($value); } }