29 lines
616 B
PHP
29 lines
616 B
PHP
<?php
|
|
|
|
namespace app\common\model;
|
|
|
|
use support\think\Model;
|
|
|
|
class UserNoticeRead extends Model
|
|
{
|
|
protected $name = 'user_notice_read';
|
|
|
|
protected $autoWriteTimestamp = true;
|
|
|
|
protected $type = [
|
|
'create_time' => 'integer',
|
|
'read_at' => 'integer',
|
|
'confirmed' => 'integer',
|
|
];
|
|
|
|
public function user(): \think\model\relation\BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id', 'id');
|
|
}
|
|
|
|
public function operationNotice(): \think\model\relation\BelongsTo
|
|
{
|
|
return $this->belongsTo(OperationNotice::class, 'notice_id', 'id');
|
|
}
|
|
}
|