Files
platforms/backend/api/internal/models/user_device_group.go
czl231 3ef33b531d 已完成用户APP首期功能开发
交付用户端首期页面、配套接口、后台资源及测试文档。用户APP构建、静态分析和三个管理后台构建通过;完整测试仍有2项失败,后端模型注释检查未通过,详见交付记录。
2026-09-13 00:57:32 +08:00

15 lines
898 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 功能保存用户自定义设备分组设备归组关系由产品档案记录版本1.0.0。
package models
// UserDeviceGroup 是本人设备的展示分组,不承载物联网控制权限。
type UserDeviceGroup struct {
Entity // 公共实体字段
UserAccountID uint64 `gorm:"column:user_account_id;not null" json:"-"` // 分组所属用户内部主键
Name string `gorm:"column:name;type:varchar(32);not null" json:"name"` // 用户自定义分组名称
RequestNo string `gorm:"column:request_no;type:varchar(36);not null" json:"-"` // 新增请求幂等标识
SortNo int `gorm:"column:sort_no;not null;default:0" json:"sort_no"` // 同一用户内的显示顺序
}
// TableName 返回独立设备分组表,不注册全库自动迁移。
func (*UserDeviceGroup) TableName() string { return "user_device_group" }