fix 兼容性调整

This commit is contained in:
zhaoxiaorong 2025-04-15 21:49:17 +08:00
parent 2de73fea00
commit ca9f7047c6
1 changed files with 5 additions and 5 deletions

View File

@ -28,8 +28,8 @@ type (
Std_IICUDS struct { Std_IICUDS struct {
ID uint `gorm:"primarykey;" json:"id"` ID uint `gorm:"primarykey;" json:"id"`
Identity string `gorm:"column:identity;type:varchar(36);uniqueIndex;" json:"identity"` // 唯一标识24位NanoID,36位为ULID Identity string `gorm:"column:identity;type:varchar(36);uniqueIndex;" json:"identity"` // 唯一标识24位NanoID,36位为ULID
CreatedAt time.Time `json:"created_at"` CreatedAt time.Time `gorm:"" json:"created_at"`
UpdatedAt time.Time `json:"updated_at"` UpdatedAt time.Time `gorm:"" json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index;" json:"deleted_at"` DeletedAt gorm.DeletedAt `gorm:"index;" json:"deleted_at"`
Status int8 `gorm:"default:0;index;" json:"status"` // 状态默认为0-1禁止1为正常 Status int8 `gorm:"default:0;index;" json:"status"` // 状态默认为0-1禁止1为正常
} }
@ -37,15 +37,15 @@ type (
// standard ID,Identity,Created,Updated,Deleted,Status definition. // standard ID,Identity,Created,Updated,Deleted,Status definition.
Std_ICUD struct { Std_ICUD struct {
ID uint `gorm:"primarykey;" json:"id"` ID uint `gorm:"primarykey;" json:"id"`
CreatedAt time.Time `json:"created_at"` CreatedAt time.Time `gorm:"" json:"created_at"`
UpdatedAt time.Time `json:"updated_at"` UpdatedAt time.Time `gorm:"" json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index;" json:"deleted_at"` DeletedAt gorm.DeletedAt `gorm:"index;" json:"deleted_at"`
} }
// standard ID,Created definition. // standard ID,Created definition.
Std_IdCreated struct { Std_IdCreated struct {
ID uint `gorm:"primarykey;" json:"id"` ID uint `gorm:"primarykey;" json:"id"`
CreatedAt time.Time `json:"created_at"` CreatedAt time.Time `gorm:"" json:"created_at"`
} }
// standard PassportID,PassportIdentity definition. // standard PassportID,PassportIdentity definition.