TimestampBehavior::class, ] ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'store_id' => 'Store ID', 'brand_cat_name' => '品牌分类名称', 'is_delete' => '是否删除', 'sort' => '排序(越大越靠前)', 'created_at' => '添加时间', 'updated_at' => '修改时间', 'status' => '是否显示', ]; } public static function getList($store_id) { return self::find()->where(['store_id' => $store_id, 'is_delete' => 0, 'status' => 1]) ->select('id, brand_cat_name')->orderBy('id DESC')->asArray()->all(); } //获取指定的商品品牌分类 public static function getBrandCat($id) { return self::findOne(['id' => $id, 'is_delete' => 0, 'status' => 1]); } }