1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- namespace common\models;
- use Yii;
- /**
- * This is the model class for table "{{%advert}}".
- *
- * @property integer $id
- * @property string $name
- * @property string $link
- * @property string $imgurl
- * @property integer $orderby
- * @property integer $created_at
- * @property integer $updated_at
- * @property integer $admin_id
- * @property integer $click_count
- * @property integer $status
- */
- class Advert extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- const ADVERT_STATE_SHOW = 1;//显示
- const ADVERT_STATE_NOT= 0;//不显示
- const ADVERT_STATE_DEL = 2;//删除状态
- public static function tableName()
- {
- return '{{%advert}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['imgurl'], 'required'],
- [['imgurl'], 'string'],
- [['orderby', 'created_at', 'updated_at','hid', 'created_author','updated_author', 'click_count', 'status'], 'integer'],
- [['name'], 'string', 'max' => 64],
- [['link'], 'string', 'max' => 255],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'name' => 'Name',
- 'hid' => '房子id',
- 'link' => 'Link',
- 'imgurl' => 'Imgurl',
- 'orderby' => 'Orderby',
- 'created_at' => 'Created At',
- 'updated_at' => 'Updated At',
- 'created_author' => 'Admin Author',
- 'updated_author'=>'Apdated Author',
- 'click_count' => 'Click Count',
- 'status' => 'Status',
- ];
- }
- }
|