init commit
This commit is contained in:
42
application/api/model/wdsxh/message/MemberNotification.php
Normal file
42
application/api/model/wdsxh/message/MemberNotification.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力中小企业发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdadmin.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Wdadmin系统产品软件并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.wdadmin.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\api\model\wdsxh\message;
|
||||
|
||||
use app\admin\model\wdsxh\message\MessageNotification;
|
||||
use think\Model;
|
||||
|
||||
class MemberNotification extends Model
|
||||
{
|
||||
// 表名
|
||||
protected $name = 'wdsxh_member_notification';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'int';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = false;
|
||||
protected $updateTime = false;
|
||||
|
||||
protected $type = [
|
||||
'status' => 'integer',
|
||||
'score' => 'float',
|
||||
'createtime' => 'timestamp:Y-m-d H:i:s',
|
||||
];
|
||||
|
||||
protected $append = [
|
||||
'title',
|
||||
];
|
||||
|
||||
public function getTitleAttr($value, $data)
|
||||
{
|
||||
return (new MessageNotification())->where('id',$data['notification_id'])->value('title');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user