TimestampBehavior::class, ] ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'store_id' => 'Store ID', 'brand_name' => '品牌名称', 'brand_logo' => '品牌logo', 'is_delete' => '是否删除', 'sort' => '排序(越大越靠前)', 'created_at' => '添加时间', 'updated_at' => '修改时间', 'is_show' => '是否显示', ]; } // public function afterSave($insert, $changedAttributes) // { /*$data = $insert ? json_encode($this->attributes) : json_encode($changedAttributes); CommonActionLog::storeActionLog('', $insert, $this->is_delete, $data, $this->id);*/ // } public static function getList($store_id) { return self::find()->where(['store_id' => $store_id, 'is_delete' => 0, 'is_show' => 1]) ->select('id, brand_name, brand_logo')->orderBy('id DESC')->asArray()->all(); } }