47 lines
743 B
PHP
47 lines
743 B
PHP
|
<?php
|
||
|
|
||
|
namespace common\models;
|
||
|
|
||
|
use Yii;
|
||
|
|
||
|
/**
|
||
|
* This is the model class for table "banner".
|
||
|
*
|
||
|
* @property int $id
|
||
|
* @property string|null $photo
|
||
|
* @property int|null $rating
|
||
|
*/
|
||
|
class Banner extends \yii\db\ActiveRecord
|
||
|
{
|
||
|
/**
|
||
|
* {@inheritdoc}
|
||
|
*/
|
||
|
public static function tableName()
|
||
|
{
|
||
|
return 'banner';
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* {@inheritdoc}
|
||
|
*/
|
||
|
public function rules()
|
||
|
{
|
||
|
return [
|
||
|
[['rating'], 'integer'],
|
||
|
[['photo'], 'string', 'max' => 255],
|
||
|
];
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* {@inheritdoc}
|
||
|
*/
|
||
|
public function attributeLabels()
|
||
|
{
|
||
|
return [
|
||
|
'id' => 'ID',
|
||
|
'photo' => 'Photo',
|
||
|
'rating' => 'Rating',
|
||
|
];
|
||
|
}
|
||
|
}
|