cxgj/models/MsgCentre.php
2023-11-27 09:45:13 +08:00

58 lines
1.4 KiB
PHP

<?php
namespace app\models;
use Yii;
/**
* This is the model class for table "{{%msg_centre}}".
*
* @property int $id
* @property int|null $type 1=租赁消息2=归还消息3=售后消息4=报警消息
* @property string|null $title 标题
* @property string|null $content 消息内容
* @property int|null $user_id
* @property int|null $is_admin_send 是否系统消息
* @property int|null $created_at
* @property int|null $object_id 默认订单id
*/
class MsgCentre extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return '{{%msg_centre}}';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['type', 'user_id', 'is_admin_send', 'created_at', 'object_id'], 'integer'],
[['content'], 'string'],
[['title'], 'string', 'max' => 50],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'type' => '1=租赁消息2=归还消息3=售后消息4=报警消息',
'title' => '标题',
'content' => '消息内容',
'user_id' => 'User ID',
'is_admin_send' => '是否系统消息',
'created_at' => 'Created At',
'object_id' => '默认订单id',
];
}
}