sozsoft-platform/configs/seeds/postgres/object/Hr_T_Training.sql
2026-10-06 14:24:30 +03:00

35 lines
1.3 KiB
SQL

CREATE TABLE IF NOT EXISTS public."Hr_T_Training"
(
"Id" uuid NOT NULL DEFAULT gen_random_uuid(),
"TenantId" uuid NULL,
"TrainingTypeId" uuid NOT NULL,
"TrainingSubjectId" uuid NOT NULL,
"EntryDate" date NOT NULL,
"BranchId" uuid NOT NULL,
"StartDate" date NOT NULL,
"EndDate" date NOT NULL,
"StartTime" timestamp NULL,
"EndTime" timestamp NULL,
"TotalHours" numeric(18, 4) NULL,
"TrainerName" varchar(200) NULL,
"TrainingPlace" text NULL,
"TrainingInstitution" text NULL,
"Description" text NULL,
"Status" varchar(16) NOT NULL DEFAULT 'Open',
"SkillIds" text NULL,
"CostPlace" numeric(18, 4) NULL DEFAULT 0,
"CostTrainer" numeric(18, 4) NULL DEFAULT 0,
"CostAccommodation" numeric(18, 4) NULL DEFAULT 0,
"CostTransport" numeric(18, 4) NULL DEFAULT 0,
"CostCatering" numeric(18, 4) NULL DEFAULT 0,
"CostOther" numeric(18, 4) NULL DEFAULT 0,
"CostTotal" numeric(18, 4) NULL DEFAULT 0,
"CreationTime" timestamp NOT NULL DEFAULT (NOW() AT TIME ZONE 'UTC'),
"CreatorId" uuid NULL,
"LastModificationTime" timestamp NULL,
"LastModifierId" uuid NULL,
"IsDeleted" boolean NOT NULL DEFAULT FALSE,
"DeletionTime" timestamp NULL,
"DeleterId" uuid NULL,
CONSTRAINT "PK_Hr_T_Training" PRIMARY KEY ("Id")
);