82 lines
2.4 KiB
PHP
82 lines
2.4 KiB
PHP
<?php
|
||
|
||
namespace app\models;
|
||
|
||
use Yii;
|
||
|
||
/**
|
||
* This is the model class for table "cx_cat1".
|
||
*
|
||
* @property int $id ID
|
||
* @property int $cx_mch_id 平台商户ID
|
||
* @property int $type 类型
|
||
* @property string $name 名称
|
||
* @property string|null $desc 描述
|
||
* @property string|null $img_url 图片
|
||
* @property int $parent_id 父ID
|
||
* @property int $sort 排序,默认100,升序
|
||
* @property int $is_delete 是否删除,0=否,1=是
|
||
* @property int $created_at 添加时间
|
||
* @property int $updated_at 更新时间
|
||
* @property int $deleted_at 删除时间
|
||
* @property int $status 是否启用,0=否,1=是
|
||
* @property int $is_hide 是否隐藏,0=否,1=是
|
||
* @property string|null $big_img_url 大图
|
||
* @property string|null $advert_pic 广告图
|
||
* @property string|null $advert_url 广告链接
|
||
* @property int|null $advert_url_type 广告链接类型
|
||
* @property string|null $advert_open_params 广告链接打开参数
|
||
*/
|
||
class Cat1 extends \yii\db\ActiveRecord
|
||
{
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public static function tableName()
|
||
{
|
||
return 'cx_cat1';
|
||
}
|
||
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public function rules()
|
||
{
|
||
return [
|
||
[['cx_mch_id', 'type', 'parent_id', 'sort', 'is_delete', 'created_at', 'updated_at', 'deleted_at', 'status', 'is_hide', 'advert_url_type'], 'integer'],
|
||
[['name'], 'required'],
|
||
[['name'], 'string', 'max' => 128],
|
||
[['desc'], 'string', 'max' => 256],
|
||
[['img_url', 'big_img_url', 'advert_pic', 'advert_url', 'advert_open_params'], 'string', 'max' => 2048],
|
||
];
|
||
}
|
||
|
||
/**
|
||
* {@inheritdoc}
|
||
*/
|
||
public function attributeLabels()
|
||
{
|
||
return [
|
||
'id' => 'ID',
|
||
'cx_mch_id' => 'Cx Mch ID',
|
||
'type' => 'Type',
|
||
'name' => 'Name',
|
||
'desc' => 'Desc',
|
||
'img_url' => 'Img Url',
|
||
'parent_id' => 'Parent ID',
|
||
'sort' => 'Sort',
|
||
'is_delete' => 'Is Delete',
|
||
'created_at' => 'Created At',
|
||
'updated_at' => 'Updated At',
|
||
'deleted_at' => 'Deleted At',
|
||
'status' => 'Status',
|
||
'is_hide' => 'Is Hide',
|
||
'big_img_url' => 'Big Img Url',
|
||
'advert_pic' => 'Advert Pic',
|
||
'advert_url' => 'Advert Url',
|
||
'advert_url_type' => 'Advert Url Type',
|
||
'advert_open_params' => 'Advert Open Params',
|
||
];
|
||
}
|
||
}
|