| Current Path : /var/www/html/ebook/backend/modules/draw/models/ |
| Current File : /var/www/html/ebook/backend/modules/draw/models/Draw.php |
<?php
namespace backend\modules\draw\models;
use Yii;
/**
* This is the model class for table "draw".
*
* @property int $draw_id
* @property string|null $name
* @property int|null $img_path
* @property string|null $created_at
* @property int|null $created_by
* @property string $updated_at
* @property int|null $updated_by
* @property string|null $description
*/
class Draw extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'draw';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['created_by', 'updated_by'], 'integer'],
[['name', 'img_base64'], 'required'],
[['created_at', 'updated_at', 'img_path'], 'safe'],
[['name'], 'string', 'max' => 255],
[['description'], 'string', 'max' => 300],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'draw_id' => Yii::t('app', 'Draw ID'),
'name' => Yii::t('app', 'Name'),
'img_base64' => Yii::t('app', 'Drawing'),
'img_path' => Yii::t('app', 'Drawing Path'),
'created_at' => Yii::t('app', 'Created At'),
'created_by' => Yii::t('app', 'Created By'),
'updated_at' => Yii::t('app', 'Updated At'),
'updated_by' => Yii::t('app', 'Updated By'),
'description' => Yii::t('app', 'Description'),
];
}
}