set Identity,Passport, DrivingLisence number as unique, add unit into nurse and set not nulll device's name

This commit is contained in:
dpurbosakti
2025-09-03 11:25:43 +07:00
parent 0fc0612a58
commit fbc10aec4b
5 changed files with 16 additions and 6 deletions

No files matched your search

@@ -10,7 +10,7 @@ import (
type Device struct {
ecore.Main // adjust this according to the needs
Code string `json:"code" gorm:"unique;size:10"`
Name string `json:"name" gorm:"size:50"`
Name string `json:"name" gorm:"not null;size:50"`
Uom_Code string `json:"uom_code" gorm:"size:10"`
Uom *eu.Uom `json:"uom,omitempty" gorm:"foreignKey:Uom_Code;references:Code"`
Infra_Id *uint16 `json:"infra_id"`