'department_id']; const TYPE_INC = 1; // 增加 const TYPE_DEC = 2; // 减少 const RECORD_TYPE_SIGN = 1; // 签到 const RECORD_TYPE_RECHARGE = 2; // 充值 const RECORD_TYPE_ACTIVITY = 3; // 活动 const RECORD_TYPE_GAME = 4; // 游戏 const RECORD_TYPE_COMMISSION = 5; // 分润 const RECORD_TYPE_BANKRUPTCY = 6; // 破产 const RECORD_TYPE_BET_REBATE = 7; // 打码返水 const RECORD_TYPE_FIRST_RECHARGE_REWARD = 8; // 首充奖励 public function __construct(array $attributes = []) { parent::__construct($attributes); $this->setTable(plugin()->webman->config('database.player_chip_record_table')); } // 減少 /** * 玩家信息 * @return BelongsTo */ public function player(): BelongsTo { return $this->belongsTo(plugin()->webman->config('database.player_model'), 'player_id')->withTrashed(); } /** * 渠道信息 * @return BelongsTo */ public function channel(): BelongsTo { return $this->belongsTo(plugin()->webman->config('database.channel_model'), 'department_id', 'department_id')->withTrashed(); } /** * 来源 * @return MorphTo */ public function source(): MorphTo { return $this->morphTo(); } }