add instalation entity
This commit is contained in:
@@ -16,6 +16,7 @@ type (
|
||||
DataVerifiedCode string
|
||||
CrudCode string
|
||||
DataApprovalCode string
|
||||
ProcessStatusCode string
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -101,6 +102,9 @@ const (
|
||||
DACNew DataApprovalCode = "new"
|
||||
DACApproved DataApprovalCode = "approved"
|
||||
DACRejected DataApprovalCode = "rejected"
|
||||
|
||||
PSCSuccess ProcessStatusCode = "success"
|
||||
PSCFailed ProcessStatusCode = "failed"
|
||||
)
|
||||
|
||||
func GetDayCodes() map[DayCode]string {
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package installation
|
||||
|
||||
type MInstalasi struct {
|
||||
NoInstalasi uint `json:"no_instalasi"`
|
||||
NamaInstalasi string `json:"nama_instalasi"`
|
||||
StatusRawatInap *uint `json:"status_rawat_inap"`
|
||||
StAktif *uint64 `json:"st_aktif"`
|
||||
}
|
||||
|
||||
func (MInstalasi) TableName() string {
|
||||
return "m_instalasi"
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package installation
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
"time"
|
||||
)
|
||||
|
||||
type InstallationLink struct {
|
||||
ecore.Main
|
||||
Simx_Id string `json:"simx_id" gorm:"unique"`
|
||||
Simgos_Id uint64 `json:"simgos_id" gorm:"unique"`
|
||||
}
|
||||
|
||||
type InstallationSimxLog struct {
|
||||
ecore.Main
|
||||
Value *string `json:"value"`
|
||||
Date *time.Time `json:"date"`
|
||||
Status erc.ProcessStatusCode `json:"status"`
|
||||
ErrMessage *string `json:"errMessage"`
|
||||
}
|
||||
|
||||
type InstallationSimgosLog struct {
|
||||
ecore.Main
|
||||
Value *string `json:"value"`
|
||||
Date *time.Time `json:"date"`
|
||||
Status erc.ProcessStatusCode `json:"status"`
|
||||
ErrMessage *string `json:"errMessage"`
|
||||
}
|
||||
@@ -31,6 +31,8 @@ func getEntities(input string) []any {
|
||||
return getMainEntities()
|
||||
case "satusehat":
|
||||
return getSatuSehatEntities()
|
||||
case "simgossync":
|
||||
return getSimgosSyncEntities()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package migration
|
||||
|
||||
func getSimgosSyncEntities() []any {
|
||||
return []any{
|
||||
//&installation.InstallationLink{},
|
||||
//&installation.InstallationSimxLog{},
|
||||
//&installation.InstallationSimgosLog{},
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
package migration
|
||||
|
||||
const (
|
||||
Main = "main"
|
||||
SatuSehat = "satusehat"
|
||||
Main = "main"
|
||||
SatuSehat = "satusehat"
|
||||
SimgosSync = "simgossync"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user