255], [['update_user'], 'string', 'max' => 50], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'category_id' => 'Category ID', 'category_name' => 'Category Name', 'parent_id' => 'Parent ID', 'delete_flag' => 'Delete Flag', 'create_time' => 'Create Time', 'update_time' => 'Update Time', 'update_user' => 'Update User', ]; } /** * Function Description:获取基础数组信息 * Function Name: getTypeArr * * @return array|\yii\db\ActiveRecord[] * * @author 娄梦宁 */ public function getTypeArr(){ $result=$this::find()->select(['category_id','category_name']) ->from(self::tableName()) ->where(['=','delete_flag',0]) ->asArray() ->all(); return $result; } /** * Des:获取 * Name: getAllList * @return array|\yii\db\ActiveRecord[] * @author 倪宗锋 */ public function getAllList() { $result = self::find() ->from(self::tableName()) ->asArray() ->all(); return $result; } /** * Des:获取页面展示的订单类型 * Name: getShowList * @return array * @author 倪宗锋 */ public function getShowList() { $result = self::find()->select(['category_id as order_type_id','category_name as order_type_des']) ->from(self::tableName()) ->asArray() ->all(); return $result; } }