26 lines
793 B
Go
26 lines
793 B
Go
package entities
|
|
|
|
import (
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type MUomEntity struct {
|
|
ID uuid.UUID `gorm:"type:uuid;primary_key;default:uuid_generate_v4()" json:"id"`
|
|
Name string `gorm:"type:varchar(100);not null;" json:"name"`
|
|
Description string `gorm:"type:text" json:"description"`
|
|
Symbol string `gorm:"type:varchar(20);" json:"symbol"`
|
|
Code string `gorm:"type:varchar(50);" json:"code"`
|
|
StdPrecision int `gorm:"type:int;" json:"std_precision"`
|
|
IsActive bool `gorm:"type:boolean;default:true" json:"is_active"`
|
|
|
|
ClientID uuid.UUID `gorm:"type:uuid;index;" json:"client_id"`
|
|
|
|
Client M_Client `gorm:"foreignKey:ClientID;references:ID" json:"client"`
|
|
|
|
FullAuditTrail
|
|
}
|
|
|
|
func (MUomEntity) TableName() string {
|
|
return "m_uoms"
|
|
}
|