'department_id']; const TYPE_DEDUCT = 0; // 扣点 const TYPE_INCREASE = 1; // 加点 const RECHARGE = 0; // 充值 const VIP_RECHARGE = 1; // vip充值 const OTHER = 2; // 其他 const ACTIVITY_GIVE = 3; // 活動外贈 const ADMIN_DEDUCT = 4; // 管理员扣点 const ADMIN_INCREASE = 5; // 管理员加点 public function __construct(array $attributes = []) { parent::__construct($attributes); $this->setTable(plugin()->webman->config('database.player_money_edit_log_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 BelongsTo */ public function user(): BelongsTo { return $this->belongsTo(plugin()->webman->config('database.user_model'), 'user_id')->withTrashed(); } }