* TP-54496| created justification message prompt for de-escalation * TP-54496| added migration file to update new column in log table * TP-54496| added feature flag * TP-54496| created util functions and constants * TP-54496| updated design changes * TP-54496| made the requested changed in PR comments * TP-54496| fixed bugs in merge conflicts * TP-54496| acknowledging to slack before hand so to not time out * TP-54496| modified log entity field justification --------- Co-authored-by: Shashank Shekhar <shashank.shekhar@navi.com>
26 lines
600 B
Go
26 lines
600 B
Go
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"`
|
|
}
|