webman/app/model/UserPhone.php

56 lines
1.3 KiB
PHP
Raw 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\model;
use support\Model;
/**
* 用户WS信息表模型
*
* @property int $id 用户记录的唯一标识符
* @property int $user_id 用户的唯一ID标识符
* @property string $phone 用户手机号WS手机号
* @property int $score 用户积分
* @property int $status 当前在线状态1: 在线0: 不在线)
* @property int $time 用户在线时长(单位:秒)
* @property string|null $remark 用户备注信息
* @property string $created_at 创建时间
* @property string $updated_at 更新时间
* @property string $last_time 最后一次在线时间
*/
class UserPhone extends Model
{
/**
* 表名
*
* @var string
*/
protected $table = 'user_phone';
/**
* 主键
*
* @var string
*/
protected $primaryKey = 'id';
/**
* 是否自动维护时间戳字段
*
* @var bool
*/
public $timestamps = true;
/**
* 表的字段类型
* 这里我们不需要使用数据库中的每个字段的类型声明Webman 模型会自动推导出来
*
* @return void
*/
protected function setUp(): void
{
parent::setUp();
$this->fillable = ['user_id', 'phone', 'score', 'status', 'time', 'remark'];
}
}