修复 model 生成脚本,统一时间字段类型为 common.LocalDateTime

This commit is contained in:
2025-04-28 09:15:49 +08:00
parent 3e837b5fec
commit 129f842153
14 changed files with 38 additions and 44 deletions

View File

@@ -6,7 +6,6 @@ package models
import (
"platform/web/common"
"time"
"gorm.io/gorm"
)
@@ -23,7 +22,7 @@ type Admin struct {
Phone string `gorm:"column:phone;comment:手机号码" json:"phone"` // 手机号码
Email string `gorm:"column:email;comment:邮箱" json:"email"` // 邮箱
Status int32 `gorm:"column:status;not null;default:1;comment:状态1-正常0-禁用" json:"status"` // 状态1-正常0-禁用
LastLogin time.Time `gorm:"column:last_login;comment:最后登录时间" json:"last_login"` // 最后登录时间
LastLogin common.LocalDateTime `gorm:"column:last_login;comment:最后登录时间" json:"last_login"` // 最后登录时间
LastLoginHost string `gorm:"column:last_login_host;comment:最后登录地址" json:"last_login_host"` // 最后登录地址
LastLoginAgent string `gorm:"column:last_login_agent;comment:最后登录代理" json:"last_login_agent"` // 最后登录代理
CreatedAt common.LocalDateTime `gorm:"column:created_at;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"` // 创建时间