22 lines
546 B
Go
22 lines
546 B
Go
package entities
|
|
|
|
import (
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type SequenceEntity struct {
|
|
ID uuid.UUID `gorm:"type:uuid;default:uuid_generate_v4()" json:"id"`
|
|
ClientID string `gorm:"column:client_id;index:idx_client_entity"`
|
|
EntityType string `gorm:"column:entity_type;index:idx_client_entity"`
|
|
Period string `gorm:"column:period"`
|
|
CurrentSeq int `gorm:"column:current_seq"`
|
|
|
|
Client M_Client `gorm:"foreignKey:ClientID;references:ID;"`
|
|
|
|
Timestamp
|
|
}
|
|
|
|
func (SequenceEntity) TableName() string {
|
|
return "sequences"
|
|
}
|