hasOne(ShopGoods::class,'id','value_id'); } public static function getStateDisplayMap() { return [ self::STATE_ATTENTION => self::STATE_ATTENTION_STRING, self::STATE_NOT_ATTENTION => self::STATE_NOT_ATTENTION_STRING ]; } public static function getCollectDetail($where){ return static::where($where)->first(); } public static function getList($where){ return static::where(array_merge(['is_attention'=>static::STATE_ATTENTION],$where))->get(); } }