package unit

import (
	ecore "simrs-vx/internal/domain/base-entities/core"
	ei "simrs-vx/internal/domain/main-entities/installation"
	eub "simrs-vx/internal/domain/main-entities/unit-position/base"
	ero "simrs-vx/internal/domain/references/organization"
)

type Unit struct {
	ecore.SmallMain                     // adjust this according to the needs
	Installation_Code *string           `json:"installation_code" gorm:"size:20"`
	Installation      *ei.Installation  `json:"installation" gorm:"foreignKey:Installation_Code;references:Code"`
	Code              string            `json:"code" gorm:"unique;size:20"`
	Name              string            `json:"name" gorm:"size:50"`
	Type_Code         *ero.UnitTypeCode `json:"type_code"`
	UnitPositions     []eub.Basic       `json:"unitPositions,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
}
