feat(api): require Yacimiento company and concession relationships
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
|||||||
|
|
||||||
// Invariante de dominio: Empresa es un maestro independiente. La jerarquía física
|
// Invariante de dominio: Empresa es un maestro independiente. La jerarquía física
|
||||||
// se expresa sólo como Departamento → Área → Yacimiento → Instalación → Subinstalación.
|
// se expresa sólo como Departamento → Área → Yacimiento → Instalación → Subinstalación.
|
||||||
|
// La Empresa y el Tipo de concesión se relacionan directamente con el Yacimiento.
|
||||||
export const INVENTORY_STRUCTURE_KINDS = [
|
export const INVENTORY_STRUCTURE_KINDS = [
|
||||||
'EMPRESA',
|
'EMPRESA',
|
||||||
'DEPARTAMENTO',
|
'DEPARTAMENTO',
|
||||||
@@ -52,6 +53,14 @@ export class CreateInventoryStructureDto {
|
|||||||
@IsUUID('4')
|
@IsUUID('4')
|
||||||
familyId?: string | null;
|
familyId?: string | null;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsUUID('4')
|
||||||
|
operatorCompanyId?: string | null;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsUUID('4')
|
||||||
|
concessionTypeId?: string | null;
|
||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@Transform(({ value }) => typeof value === 'string' && value.trim() ? value.trim() : null)
|
@Transform(({ value }) => typeof value === 'string' && value.trim() ? value.trim() : null)
|
||||||
@IsString()
|
@IsString()
|
||||||
|
|||||||
Reference in New Issue
Block a user