Files
houston-be/model/log/entity.go

26 lines
600 B
Go
Raw Permalink Normal View History

package log
import (
"gorm.io/datatypes"
"time"
)
type LogEntity struct {
CreatedAt time.Time `gorm:"column:created_at"`
RelationName string `gorm:"column:relation_name"`
RecordId uint `gorm:"column:record_id"`
UserInfo datatypes.JSON `gorm:"column:user_info"`
Changes datatypes.JSON `gorm:"column:changes"`
Justification string `gorm:"column:justification;default:NULL"`
}
func (LogEntity) TableName() string {
return "log"
}
type UserInfo struct {
Id string `json:"id"`
Email string `json:"email"`
Name string `json:"name"`
}