gorm_models/models/amendment.go

31 lines
1.1 KiB
Go

package models
import "time"
// DBAmendment is used to store any changes made to interpreter or client processed calls in the database, although theoretically it could be tailored to any table, as long as the amendments queue handles the application logic..
//
// - Id is an auto-incrementing integer, with no practical application.
// - ConversationId references the conversation ID of either the client or interpreter processed call.
// - AmendmentColumn is the name of the column to be amended.
// - AmendmentValue is the value to overwrite the amendment column's existing value with.
// - Requestor is a string reference as to who created the amendment.
// - RequestedAt is the creation time of the amendment.
//
// Table Schema:
//
// Primary Key: Id
// Indexes: Id, ConversationId, RequestedAt
type DBAmendment struct {
Id int `gorm:"primaryKey;autoIncrement"`
ConversationId string `gorm:"index"`
AmendmentColumn string
AmendmentValue string
Requestor string
RequestedAt time.Time `gorm:"index"`
Sequence string
}
func (DBAmendment) TableName() string {
return "gc_amendments"
}