bindbox-game/internal/repository/mysql/model/app_message_read_status.gen.go
邹方成 1a285f4e23 feat(消息状态): 添加消息已读状态功能
- 新增消息已读状态表结构及模型
- 实现用户端标记消息为已读接口
- 添加管理端获取最新消息记录接口
- 实现微信小程序登录功能
- 更新相关API文档和路由配置
2025-10-18 18:24:42 +08:00

28 lines
1.5 KiB
Go

// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
package model
import (
"time"
)
const TableNameAppMessageReadStatus = "app_message_read_status"
// AppMessageReadStatus 消息已读状态表
type AppMessageReadStatus struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键ID" json:"id"` // 主键ID
AppID string `gorm:"column:app_id;not null;comment:小程序ID" json:"app_id"` // 小程序ID
MessageID int32 `gorm:"column:message_id;not null;comment:消息ID" json:"message_id"` // 消息ID
UserID string `gorm:"column:user_id;not null;comment:用户ID" json:"user_id"` // 用户ID
IsRead int32 `gorm:"column:is_read;not null;default:0;comment:是否已读(0:未读 1:已读)" json:"is_read"` // 是否已读(0:未读 1:已读)
ReadTime *time.Time `gorm:"column:read_time;comment:已读时间" json:"read_time"` // 已读时间
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"` // 更新时间
}
// TableName AppMessageReadStatus's table name
func (*AppMessageReadStatus) TableName() string {
return TableNameAppMessageReadStatus
}