Merge pull request #147 from dikstub-rssa/migration-vanilia
Migration vanilia
This commit is contained in:
No files matched your search
@@ -16,6 +16,7 @@ type (
|
||||
DataVerifiedCode string
|
||||
CrudCode string
|
||||
DataApprovalCode string
|
||||
ProcessStatusCode string
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -102,6 +103,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 {
|
||||
No_Instalasi uint `json:"no_instalasi" gorm:"primaryKey;autoIncrement;column:no_instalasi"`
|
||||
Nama_Instalasi string `json:"nama_instalasi" gorm:"column:nama_instalasi"`
|
||||
Status_Rawat_Inap uint `json:"status_rawat_inap" gorm:"column:status_rawat_inap"`
|
||||
St_Aktif uint `json:"st_aktif" gorm:"column: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 uint `json:"simx_id" gorm:"unique"`
|
||||
Simgos_Id uint `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,14 @@
|
||||
package migration
|
||||
|
||||
import (
|
||||
/************** Source ***************/
|
||||
installation "simrs-vx/internal/domain/sync-entities/installation"
|
||||
)
|
||||
|
||||
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