| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use Yii;
- use yii\behaviors\TimestampBehavior;
- use yii\db\ActiveRecord;
- /**
- * This is the model class for table "{{%saas_category}}".
- *
- * @property integer $id
- * @property string $name
- * @property integer $is_enable
- * @property integer $is_delete
- * @property string $option
- * @property integer $sort
- * @property integer $created_at
- * @property integer $updated_at
- * @property string $icon
- */
- class SaasCategory extends \yii\db\ActiveRecord
- {
- /**
- * 删除状态:已删除
- */
- const DELETE_STATUS_TRUE = 1;
- /**
- * 删除状态:未删除
- */
- const DELETE_STATUS_FALSE = 0;
- /**
- * 禁用状态:已禁用
- */
- const IS_ENABLE_FALSE = 0;
- /**
- * 禁用状态:未禁用
- */
- const IS_ENABLE_TRUE= 1;
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%saas_category}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['is_delete', 'is_enable', 'sort'], 'integer'],
- [['name', 'icon'], 'string', 'max' => 255],
- [['option'], 'string'],
- ];
- }
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::class,
- 'attributes' => [
- ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
- ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
- ]
- ]
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => '分类ID',
- 'name' => '分类名称',
- 'is_delete' => 'Is Delete',
- 'is_enable' => '状态',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- 'option' => '筛选配置',
- 'sort' => '排序',
- 'icon' => '图标',
- ];
- }
- }
|