2023-10-19 15:47:04 +05:30
|
|
|
package log
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"gorm.io/datatypes"
|
|
|
|
|
"time"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type LogEntity struct {
|
2024-02-07 18:11:50 +05:30
|
|
|
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"`
|
2023-10-19 15:47:04 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (LogEntity) TableName() string {
|
2023-11-02 15:32:04 +05:30
|
|
|
return "log"
|
2023-10-19 15:47:04 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type UserInfo struct {
|
|
|
|
|
Id string `json:"id"`
|
|
|
|
|
Email string `json:"email"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
}
|