72 lines
1.8 KiB
PHP
72 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace common\modelsgii;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* This is the model class for table "yii_doctor_article".
|
|
*
|
|
* @property int $id
|
|
* @property int $type 文章类型1图文类型2图片
|
|
* @property int $cid 分类id
|
|
* @property int $su_id 医生id
|
|
* @property string|null $cover 封面
|
|
* @property string $title 文章标题
|
|
* @property string|null $intro 简介
|
|
* @property string|null $content 内容
|
|
* @property string|null $video_url 视频链接
|
|
* @property int $read_num 阅读量
|
|
* @property int $collection
|
|
* @property int $is_draft 是否是草稿0否1是
|
|
* @property int $created_at
|
|
* @property int $updated_at
|
|
* @property int $is_delete
|
|
*/
|
|
class DoctorArticle extends \common\core\BaseActiveRecord
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return 'yii_doctor_article';
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['su_id','cid'], 'required'],
|
|
[['su_id','type', 'cid','read_num', 'collection', 'is_draft', 'created_at', 'updated_at', 'is_delete'], 'integer'],
|
|
[['cover', 'intro', 'content','video_url'], 'string'],
|
|
[['title'], 'string', 'max' => 255],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'id' => 'ID',
|
|
'type' => 'Type',
|
|
'cid' => 'Cid',
|
|
'su_id' => '医生ID',
|
|
'cover' => '封面',
|
|
'title' => '标题',
|
|
'intro' => '简介',
|
|
'content' => '内容',
|
|
'read_num' => '阅读量',
|
|
'collection' => 'Collection',
|
|
'is_draft' => '是否草稿',
|
|
'created_at' => 'Created At',
|
|
'updated_at' => 'Updated At',
|
|
'is_delete' => 'Is Delete',
|
|
];
|
|
}
|
|
}
|