\App\ModelsSysMessageRead

系统通知已读记录

职责:记录"用户 × 通知"的已读事实(稀疏行,联合主键幂等)。 未读数 = 可见 need_read 通知数 − 本人已读行数(NOT EXISTS 差集)。

Summary

Methods
Properties
Constants
timestampCasts()
$timestamps
$incrementing
$message_id
$user_id
$read_time
No constants found
serializeDate()
casts()
$table
$fillable
N/A
No private methods found
No private properties found
N/A

Properties

$timestamps

$timestamps

$incrementing

$incrementing

复合主键(message_id + user_id),关闭 Eloquent 自增主键语义

$message_id

$message_id : int

通知 id

Type

int

$user_id

$user_id : int

用户 id

Type

int

$read_time

$read_time : string

已读时间

┌────────────────── 分区导航(按此顺序阅读)──────────────────┐ 分区 1 · 表名与属性 $table / 复合主键禁用自增 └────────────────────────────────────────────────────────────┘

Type

string

$table

$table

$fillable

$fillable

Methods

timestampCasts()

timestampCasts() : array<string,string>

全库统一的时间列 cast 段(单源:约 22 个模型 casts() 内重复的两行)。 使用方模型 casts() 内 `return array_merge(self::timestampCasts(), [...])`。

Returns

array

serializeDate()

serializeDate(\DateTimeInterface  $date) : string

所有日期属性统一按 "年-月-日 时:分:秒" 序列化。

Parameters

\DateTimeInterface $date

Returns

string —

casts()

casts() : array

Returns

array —