Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8d7737723 | ||
|
|
35104ebb90 |
@@ -5,6 +5,10 @@ type LogItem struct {
|
|||||||
OpName string `json:"op_name"`
|
OpName string `json:"op_name"`
|
||||||
OpType string `json:"op_type"`
|
OpType string `json:"op_type"`
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
|
Code string `json:"code"`
|
||||||
|
Level uint `json:"level"`
|
||||||
|
Ip string `json:"ip"`
|
||||||
|
Module string `json:"module"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
12
types/db.go
12
types/db.go
@@ -28,9 +28,9 @@ type (
|
|||||||
Std_IICUDS struct {
|
Std_IICUDS struct {
|
||||||
ID uint `gorm:"column:id;primarykey;" json:"id"`
|
ID uint `gorm:"column:id;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 `gorm:"column:created_at;" json:"created_at"`
|
CreatedAt time.Time `gorm:"column:created_at;type:TIMESTAMP;" json:"created_at"`
|
||||||
UpdatedAt time.Time `gorm:"column:updated_at;" json:"updated_at"`
|
UpdatedAt time.Time `gorm:"column:updated_at;type:TIMESTAMP;" json:"updated_at"`
|
||||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index;" json:"deleted_at"`
|
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:TIMESTAMP;index;" json:"deleted_at"`
|
||||||
Status int8 `gorm:"column:status;default:0;index;" json:"status"` // 状态:默认为0,-1禁止,1为正常
|
Status int8 `gorm:"column:status;default:0;index;" json:"status"` // 状态:默认为0,-1禁止,1为正常
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,14 +38,14 @@ type (
|
|||||||
Std_ICUD struct {
|
Std_ICUD struct {
|
||||||
ID uint `gorm:"column:id;primarykey;" json:"id"`
|
ID uint `gorm:"column:id;primarykey;" json:"id"`
|
||||||
CreatedAt time.Time `gorm:"column:created_at;" json:"created_at"`
|
CreatedAt time.Time `gorm:"column:created_at;" json:"created_at"`
|
||||||
UpdatedAt time.Time `gorm:"column:updated_at;" json:"updated_at"`
|
UpdatedAt time.Time `gorm:"column:updated_at;type:TIMESTAMP;" json:"updated_at"`
|
||||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index;" json:"deleted_at"`
|
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:TIMESTAMP;index;" json:"deleted_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// standard ID,Created definition.
|
// standard ID,Created definition.
|
||||||
Std_IdCreated struct {
|
Std_IdCreated struct {
|
||||||
ID uint `gorm:"column:id;primarykey;" json:"id"`
|
ID uint `gorm:"column:id;primarykey;" json:"id"`
|
||||||
CreatedAt time.Time `gorm:"column:created_at;" json:"created_at"`
|
CreatedAt time.Time `gorm:"column:created_at;type:TIMESTAMP;" json:"created_at"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// standard PassportID,PassportIdentity definition.
|
// standard PassportID,PassportIdentity definition.
|
||||||
|
|||||||
Reference in New Issue
Block a user