| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <?php
- namespace addons\WechatVideoShop\common\models;
- use Yii;
- /**
- * This is the model class for table "qimall_addons_wechat_video_shop_cate_audit".
- *
- * @property int $id
- * @property int $mall_id
- * @property int $status 状态[1启用 0禁用 -1删除]
- * @property int $created_at 创建时间
- * @property int $updated_at 更新事件
- * @property int $audit_id 审核ID
- * @property int $audit_status 审核状态
- * @property string $audit_reason 拒绝理由
- * @property int $cat_one 一级类目
- * @property int $cat_two 二级类目
- * @property int $cat_three 三级类目
- * @property int $shop_id 三级类目
- * @property array $req 提交数据
- */
- class WechatVideoShopCateAudit extends \common\models\base\BaseActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return 'qimall_addons_wechat_video_shop_cate_audit';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['mall_id', 'status', 'created_at', 'updated_at', 'audit_id', 'audit_status', 'cat_one', 'cat_two', 'cat_three', 'shop_id'], 'integer'],
- [['req'], 'safe'],
- [['audit_reason'], 'string', 'max' => 1000],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'mall_id' => 'Mall ID',
- 'status' => 'Status',
- 'created_at' => 'Created At',
- 'updated_at' => 'Updated At',
- 'audit_id' => 'Audit ID',
- 'audit_status' => 'Audit Status',
- 'audit_reason' => 'Audit Reason',
- 'cat_one' => 'Cat One',
- 'cat_two' => 'Cat Two',
- 'cat_three' => 'Cat Three',
- 'req' => 'Req',
- ];
- }
- /**
- * @return \yii\db\ActiveQuery
- */
- public function getCatOne()
- {
- return $this->hasOne(WechatVideoShopCate::class, ['id' => 'cat_one']);
- }
- /**
- * @return \yii\db\ActiveQuery
- */
- public function getCatTwo()
- {
- return $this->hasOne(WechatVideoShopCate::class, ['id' => 'cat_two']);
- }
- /**
- * @return \yii\db\ActiveQuery
- */
- public function getCatThree()
- {
- return $this->hasOne(WechatVideoShopCate::class, ['id' => 'cat_three']);
- }
- public function getShop()
- {
- return $this->hasOne(WechatVideoShop::class, ['id' => 'shop_id']);
- }
- }
|