'department_id']; protected $fillable = [ 'content', 'title', 'lang', 'announcement_id', 'department_id', ]; public function __construct(array $attributes = []) { parent::__construct($attributes); $this->setTable(plugin()->webman->config('database.announcement_content_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 announcement(): BelongsTo { return $this->belongsTo(plugin()->webman->config('database.announcement_model'), 'announcement_id')->withTrashed(); } }