pre-dev: initial commit

This commit is contained in:
2025-08-11 10:41:25 +07:00
parent e0ecf1c906
commit ee9b4a9035
50 changed files with 1020 additions and 1 deletions

No files matched your search

+26
View File
@@ -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"`
}