'customer', self::ACTION_COLLECT => 'collects', self::ACTION_LIKE => 'likes', self::ACTION_VIEW => 'views', self::ACTION_SHARE => 'shares', self::ACTION_SHARE_VIEW => 'views',//分享内容被查看 也增加views ]; } /** * 概览操作对应字段 * * @return string[] */ public static function overviewField(): array { return [ self::ACTION_REGISTER => 'customer', self::ACTION_VIEW => 'views', self::ACTION_SHARE => 'shares', self::ACTION_SHARE_VIEW => 'views',//分享内容被查看 也增加views ]; } /** * 模型关联:内容文档 */ public function archive(): HasOne { return $this->hasOne(Archives::class, 'id', 'relation_id'); } }