| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use Yii;
- /**
- * This is the model class for table "{{%mch_diy_page}}".
- *
- * @property integer $id
- * @property integer $store_id
- * @property integer $mch_id
- * @property string $title
- * @property integer $template_id
- * @property integer $is_delete
- * @property integer $addtime
- * @property integer $status
- * @property integer $is_index
- */
- class MchDiyPage extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%mch_diy_page}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['store_id', 'mch_id', 'template_id', 'is_delete', 'addtime', 'status', 'is_index'], 'integer'],
- [['template_id', 'addtime'], 'required'],
- [['title'], 'string', 'max' => 45],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => 'Store ID',
- 'mch_id' => '商户id',
- 'title' => '页面标题',
- 'template_id' => '模板ID',
- 'is_delete' => 'Is Delete',
- 'addtime' => 'Addtime',
- 'status' => '状态 0--禁用 1--启用',
- 'is_index' => '是否覆盖首页 0--不覆盖 1--覆盖',
- ];
- }
- public function getTemplate()
- {
- return $this->hasOne(MchDiyTemplate::className(), ['id' => 'template_id']);
- }
- }
|