sozsoft-platform/configs/seeds/postgres/object/Hr_T_VehicleMovement.sql

35 lines
1.1 KiB
MySQL
Raw Normal View History

2026-10-06 11:24:30 +00:00
CREATE TABLE IF NOT EXISTS public."Hr_T_VehicleMovement"
(
"Id" uuid NOT NULL DEFAULT gen_random_uuid(),
"TenantId" uuid NULL,
"MovementNo" integer NOT NULL DEFAULT 0,
"VehicleId" uuid NOT NULL,
"BranchId" uuid NULL,
"ExitDate" date NOT NULL,
"ExitTime" varchar(5) NOT NULL,
"ExitKm" integer NOT NULL,
"SenderUserId" uuid NULL,
"SecurityUserId" uuid NULL,
"DriverUserId" uuid NOT NULL,
"DestinationId" uuid NULL,
"Reason" text NULL,
"Location" varchar(128) NULL,
"EntrySecurityUserId" uuid NULL,
"EntryBranchId" uuid NULL,
"EntryDate" date NULL,
"EntryTime" varchar(5) NULL,
"EntryKm" integer NULL,
"TravelledKm" integer NULL,
"Status" varchar(16) NOT NULL DEFAULT 'Left',
"DurationMinutes" integer NULL,
"ExpectedKm" integer NULL,
"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_VehicleMovement" PRIMARY KEY ("Id")
);