Files
simrsx-be/internal/domain/_template/single/entity.go

26 lines
705 B
Go

/*
DESCRIPTION:
Sample of struct to define an entity both in the application and database.
Uses the base struct from the core package for the standard
attributes.
NOTES:
Make sure to use 'case-sensitive' option when doing search-replace
TODO:
- replace 'single' with the name of the package, ie: 'patient'
- replace 'Single' with the name of the entity, ie: 'Patient'
*/
package single
import (
ecore "simrs-vx/internal/domain/base-entities/core"
)
type Single struct {
ecore.Main // adjust this according to the needs
Code string `json:"code" gorm:"uniqueIndex;not null;size:10"`
Name string `json:"name" gorm:"not null;size:100"`
Description string `json:"description"`
}