Changed the structure slightly of Amendments

This commit is contained in:
Frederick Holland 2025-07-04 10:34:16 +10:00
parent abf0d6caf0
commit b52f1cd80d

View File

@ -3,14 +3,12 @@ package models
import "time" import "time"
type DBAmendment struct { type DBAmendment struct {
Id int `gorm:"index"` Id int `gorm:"primaryKey;index"`
IndexColumn string `gorm:"primaryKey;index"` ConversationId string `gorm:"index"`
IndexId string `gorm:"primaryKey;index"`
Table string `gorm:"primaryKey;index"`
AmendmentColumn string AmendmentColumn string
AmendmentValue string AmendmentValue string
Requestor string Requestor string
Timestamp time.Time RequestedAt time.Time
} }
func (DBAmendment) TableName() string { func (DBAmendment) TableName() string {
@ -18,13 +16,14 @@ func (DBAmendment) TableName() string {
} }
type DBAmendmentLog struct { type DBAmendmentLog struct {
Id int `gorm:"index"` Id int `gorm:"primaryKey;index"`
Table string `gorm:"primaryKey;index"` ConversationId string `gorm:"index"`
AmendmentColumn string AmendmentColumn string
OldValue string OldValue string
NewValue string NewValue string
Requestor string Requestor string
Timestamp time.Time RequestedAt time.Time
AmendedAt time.Time
} }
func (DBAmendmentLog) TableName() string { func (DBAmendmentLog) TableName() string {