36 lines
662 B
PHP
Executable File
36 lines
662 B
PHP
Executable File
<?php
|
|
namespace app\model;
|
|
|
|
use think\model\relation\HasOne;
|
|
|
|
/**
|
|
* 投诉与意见记录
|
|
* Class Feedback
|
|
* @package app\model
|
|
*/
|
|
class Feedback extends Base
|
|
{
|
|
public const STATUS_WAITING = 0; // 待处理
|
|
public const STATUS_DONE = 1; // 已处理
|
|
|
|
|
|
/**
|
|
* 模型关联:意见分类
|
|
*
|
|
* @return HasOne
|
|
*/
|
|
public function type(): HasOne
|
|
{
|
|
return $this->hasOne(FeedbackType::class, 'id', 'type_id');
|
|
}
|
|
|
|
/**
|
|
* 模型关联:用户
|
|
*
|
|
* @return HasOne
|
|
*/
|
|
public function account(): HasOne
|
|
{
|
|
return $this->hasOne(Account::class, 'id', 'account_id');
|
|
}
|
|
} |