123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace common\models;
- use Yii;
- /**
- * This is the model class for table "{{%hot_search}}".
- *
- * @property integer $id
- * @property string $keyword
- * @property integer $create_at
- */
- class HotSearch extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- const HOT_SEARCH_COMMON = 1;//热门搜索存在
- const HOT_SEARCH_DEL = 0;//热门搜索删除
- public static function tableName()
- {
- return '{{%hot_search}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['keyword', 'create_at','status'], 'required'],
- [['create_at','updated_at','status'], 'integer'],
- [['keyword'], 'string', 'max' => 64],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'keyword' => 'Keyword',
- 'create_at' => 'Create At',
- 'updated_at' => 'Updated At',
- 'status' => 'status',
- ];
- }
- }
|