12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace app\models;
- use Yii;
- /**
- * This is the model class for table "{{%search_record}}".
- *
- * @property int $id ID
- * @property int $content_model_id 关联模型
- * @property string $keyword 搜索词
- * @property int $result_num 返回结果数
- * @property int $times 搜索次数
- * @property int $recommend 推荐
- * @property int $create_time 搜索时间
- */
- class SearchRecord extends \app\common\models\EActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%search_record}}';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['content_model_id', 'result_num', 'times', 'recommend', 'create_time'], 'integer'],
- [['keyword'], 'string', 'max' => 100],
- [['keyword'], 'required'],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => Yii::t('attr','search_record.id'),
- 'content_model_id' => Yii::t('attr','search_record.content_model_id'),
- 'keyword' => Yii::t('attr','search_record.keyword'),
- 'result_num' => Yii::t('attr','search_record.result_num'),
- 'times' => Yii::t('attr','search_record.times'),
- 'recommend' => Yii::t('attr','search_record.recommend'),
- 'create_time' => Yii::t('attr','search_record.create_time'),
- ];
- }
- }
|