init commit

This commit is contained in:
2026-03-17 09:56:00 +08:00
commit e2c8ae752d
6827 changed files with 1211784 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
<?php
namespace app\admin\model\wdsxh\message;
use think\Model;
class MessageNotificationMemberId extends Model
{
// 表名
protected $name = 'wdsxh_message_notification_member_id';
// 自动写入时间戳字段
protected $autoWriteTimestamp = false;
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = false;
protected $deleteTime = false;
// 追加属性
protected $append = [
'send_status'
];
public function getSendStatusAttr($value, $data)
{
$memberNotificationObj = (new MemberNotification())
->where('notification_id', $data['notification_id'])
->where('member_id', $data['member_id'])
->find();
return $memberNotificationObj ? 1 : 2;
}
public function member()
{
return $this->belongsTo('app\admin\model\wdsxh\Member', 'member_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}