cxfoot/models/Activity.php
2023-10-27 14:25:12 +08:00

78 lines
2.5 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace app\models;
use Yii;
/**
* This is the model class for table "cx_activity".
*
* @property int $id
* @property string|null $name 活动名称
* @property string|null $content 活动富文本
* @property string|null $poster_img_arr 海报数组,当只有一个时则单张,多张时轮播
* @property string|null $poster_btn_name 海报按钮名称,如果为空,则不展示
* @property string|null $poster_btn_url 海报按钮跳转链接
* @property string|null $content_btn_name 内容按钮名称
* @property string|null $content_btn_url 内容按钮跳转链接
* @property string|null $data 活动配置数据
* @property int|null $type 类型,暂时无用
* @property int|null $start_time 活动开始时间
* @property int|null $end_time 活动结束时间
* @property int|null $status 状态1.正常2.关闭
* @property int|null $created_at 创建时间
* @property int|null $updated_at 更新时间
* @property int|null $is_delete 是否删除
* @property int|null $deleted_at 删除时间
*/
class Activity extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'cx_activity';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['content', 'data'], 'string'],
[['type', 'start_time', 'end_time', 'status', 'created_at', 'updated_at', 'is_delete', 'deleted_at'], 'integer'],
[['name', 'poster_btn_url', 'content_btn_url'], 'string', 'max' => 255],
[['poster_img_arr'], 'string', 'max' => 500],
[['poster_btn_name', 'content_btn_name'], 'string', 'max' => 50],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'name' => 'Name',
'content' => 'Content',
'poster_img_arr' => 'Poster Img Arr',
'poster_btn_name' => 'Poster Btn Name',
'poster_btn_url' => 'Poster Btn Url',
'content_btn_name' => 'Content Btn Name',
'content_btn_url' => 'Content Btn Url',
'data' => 'Data',
'type' => 'Type',
'start_time' => 'Start Time',
'end_time' => 'End Time',
'status' => 'Status',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'is_delete' => 'Is Delete',
'deleted_at' => 'Deleted At',
];
}
}