14 lines
532 B
Go
14 lines
532 B
Go
package model
|
|
|
|
import "time"
|
|
|
|
type AuditLog struct {
|
|
ID uint `json:"id" gorm:"primaryKey"`
|
|
UserID uint `json:"user_id" gorm:"not null;index"`
|
|
EntityType string `json:"entity_type" gorm:"size:32;not null;index"`
|
|
EntityID uint `json:"entity_id" gorm:"not null;index"`
|
|
Action string `json:"action" gorm:"size:16;not null;index"`
|
|
BeforeJSON string `json:"before_json" gorm:"type:text"`
|
|
AfterJSON string `json:"after_json" gorm:"type:text"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
} |