You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
2.1 KiB
90 lines
2.1 KiB
<?php
|
|
/**
|
|
* +----------------------------------------------------------------------
|
|
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
|
* +----------------------------------------------------------------------
|
|
* | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
|
|
* +----------------------------------------------------------------------
|
|
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
|
* +----------------------------------------------------------------------
|
|
* | Author: CRMEB Team <admin@crmeb.com>
|
|
* +----------------------------------------------------------------------
|
|
*/
|
|
|
|
/**
|
|
* 投诉管理
|
|
* @author crud自动生成代码
|
|
* @date 2023/10/16 15:26:40
|
|
*/
|
|
|
|
namespace app\model\crud;
|
|
|
|
|
|
use crmeb\basic\BaseModel;
|
|
|
|
/**
|
|
* Class UserComplaint
|
|
* @date 2023/10/16
|
|
* @package app\model\crud
|
|
*/
|
|
class UserComplaint extends BaseModel
|
|
{
|
|
|
|
/**
|
|
* 表名
|
|
* @var string
|
|
*/
|
|
protected $name = 'user_complaint';
|
|
|
|
/**
|
|
* 主键
|
|
* @var string
|
|
*/
|
|
protected $pk = 'id';
|
|
|
|
/**
|
|
* 添加时间获取器
|
|
* @date 2023-10-16
|
|
* @param string $value
|
|
* @return string
|
|
*/
|
|
public function getCreateTimeLabelAttr($value)
|
|
{
|
|
$value = $value ? json_decode($value, true) : [];
|
|
return $value;
|
|
}
|
|
|
|
/**
|
|
* 修改时间获取器
|
|
* @date 2023-10-16
|
|
* @param string $value
|
|
* @return string
|
|
*/
|
|
public function getUpdateTimeLabelAttr($value)
|
|
{
|
|
$value = $value ? json_decode($value, true) : [];
|
|
return $value;
|
|
}
|
|
|
|
|
|
/**
|
|
* 学校ID一对一关联
|
|
* @date 2023/10/16
|
|
* @return \think\model\relation\HasOne
|
|
*/
|
|
public function schoolIdHasOne()
|
|
{
|
|
return $this->hasOne(\app\model\crud\School::class, 'id', 'school_id');
|
|
}
|
|
|
|
/**
|
|
* 用户ID一对一关联
|
|
* @date 2023/10/16
|
|
* @return \think\model\relation\HasOne
|
|
*/
|
|
public function userIdHasOne()
|
|
{
|
|
return $this->hasOne(\app\model\user\User::class, 'uid', 'user_id');
|
|
}
|
|
|
|
}
|
|
|