| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?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 "{{%form_data}}".
- *
- * @property integer $id
- * @property integer $store_id
- * @property integer $goods_id
- * @property integer $user_id
- * @property integer $saas_user_id
- * @property integer $is_delete
- * @property integer $status
- * @property integer $created_at
- * @property integer $updated_at
- * @property string $form
- */
- class FormData extends \yii\db\ActiveRecord
- {
- const STATUS_WAIT_AUDIT = 0; //未审核
- const STATUS_VALID = 1; //已审核
- const STATUS_REJECT = 2; //已拒绝
-
- const TYPE_GOODS = 0; //商品
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%form_data}}';
- }
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::class,
- ]
- ];
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['id', 'store_id', 'goods_id', 'user_id', 'saas_user_id', 'is_delete', 'status'], 'integer'],
- [['created_at', 'updated_at'], 'safe'],
- [['form'], 'string'],
- ];
- }
-
- public static function getStatusName($status){
- $arr = [
- self::STATUS_WAIT_AUDIT => '未审核',
- self::STATUS_VALID => '已审核',
- self::STATUS_REJECT => '已拒绝',
- ];
- return $arr[$status] ?? '';
- }
- }
|