pre-dev: initial commit
This commit is contained in:
No files matched your search
@@ -0,0 +1,26 @@
|
||||
package single
|
||||
|
||||
type Createdto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type ReadDetailDto struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
type Updatedto struct {
|
||||
Id uint `json:"id"`
|
||||
Createdto
|
||||
}
|
||||
|
||||
type Deletedto struct {
|
||||
Id uint `json:"id"`
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user