| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use yii\db\ActiveRecord;
- use yii\behaviors\TimestampBehavior;
- /**
- * This is the model class for table "{{%q_and_a_question_template}}".
- *
- * @property int $id
- * @property int $store_id
- * @property int $is_delete
- * @property int $cat_id
- * @property string $name
- * @property string $question
- * @property int $created_at
- * @property int $is_hot
- * @property int $updated_at
- * @property int $state
- */
- class QAndAQuestionTemplate extends \yii\db\ActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%q_and_a_question_template}}';
- }
- 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 rules()
- {
- return [
- [['store_id', 'name', 'question', 'is_hot', 'cat_id'], 'required'],
- [['store_id', 'name', 'question', 'created_at', 'is_delete', 'updated_at', 'state'], 'safe']
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => 'Store ID',
- 'cat_id' => '分类id',
- 'name' => '名称',
- 'question' => '问题',
- 'is_hot' => '是否热门',
- 'created_at' => '添加时间',
- 'is_delete' => '是否删除',
- 'updated_at' => 'Update Time',
- ];
- }
- }
|