commit working state
Too many changes to split them up. This commit contains roughly two months worth of work. This commit introduces the first aggregate and rewrites the ticket system to follow DDD patterns. It adds Spartan NG as the new component library. TanStack Query to replace GraphQL. Oh and Prisma is almost over as well.
This commit is contained in:
@@ -117,13 +117,13 @@ CREATE TABLE public."Anomaly" (
|
||||
description text NOT NULL,
|
||||
"groupKey" text NOT NULL,
|
||||
"groupDescription" text NOT NULL,
|
||||
"associatedEntities" jsonb DEFAULT '{}'::jsonb,
|
||||
"workedOnBy" text NOT NULL,
|
||||
"sleepTimer" integer NOT NULL,
|
||||
"sleepSince" timestamp(3) without time zone,
|
||||
"resolvedAt" timestamp(3) without time zone,
|
||||
"manuallyResolved" boolean DEFAULT false NOT NULL,
|
||||
"createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
"associatedEntities" jsonb DEFAULT '{}'::jsonb
|
||||
"createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
|
||||
);
|
||||
|
||||
|
||||
@@ -203,16 +203,16 @@ CREATE TABLE public."CostType" (
|
||||
--
|
||||
|
||||
CREATE TABLE public."DyflexisEmployee" (
|
||||
"internalId" uuid DEFAULT gen_random_uuid() NOT NULL,
|
||||
id integer NOT NULL,
|
||||
firstname text NOT NULL,
|
||||
surname text NOT NULL,
|
||||
"contractStart" timestamp(3) without time zone NOT NULL,
|
||||
"contractEnd" timestamp(3) without time zone,
|
||||
"contractDaysWeek" integer DEFAULT 0 NOT NULL,
|
||||
"contractHoursWeek" double precision NOT NULL,
|
||||
"contractSalaryHour" double precision NOT NULL,
|
||||
"contractTypeName" text,
|
||||
"internalId" uuid DEFAULT gen_random_uuid() NOT NULL,
|
||||
"contractDaysWeek" integer DEFAULT 0 NOT NULL
|
||||
"contractTypeName" text
|
||||
);
|
||||
|
||||
|
||||
@@ -435,8 +435,8 @@ CREATE TABLE public."PlannedTimeStaging" (
|
||||
"endDate" timestamp(3) without time zone NOT NULL,
|
||||
deleted boolean NOT NULL,
|
||||
mark text,
|
||||
duration integer NOT NULL,
|
||||
pause integer NOT NULL
|
||||
pause integer NOT NULL,
|
||||
duration integer NOT NULL
|
||||
);
|
||||
|
||||
|
||||
@@ -506,15 +506,25 @@ CREATE TABLE public."TariffGroup" (
|
||||
--
|
||||
|
||||
CREATE TABLE public."Ticket" (
|
||||
id uuid DEFAULT gen_random_uuid() NOT NULL,
|
||||
"currentState" public."TicketValidationState" NOT NULL,
|
||||
id uuid NOT NULL,
|
||||
"patientId" uuid,
|
||||
stage text NOT NULL,
|
||||
"approvalRequirement" text NOT NULL,
|
||||
"approvalStatus" text NOT NULL,
|
||||
"approvalRequestedAt" timestamp(3) without time zone,
|
||||
"approvalLastInteractionAt" timestamp(3) without time zone,
|
||||
"approvalReminderCount" integer DEFAULT 0 NOT NULL,
|
||||
"hasPhysicalTransportDocument" boolean DEFAULT false NOT NULL,
|
||||
"hasDigitalTransportDocument" boolean DEFAULT false NOT NULL,
|
||||
"updatedAt" timestamp(3) without time zone,
|
||||
"createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
"currentState" public."TicketValidationState",
|
||||
notes text[],
|
||||
errors text[],
|
||||
"isUrgent" boolean DEFAULT false NOT NULL,
|
||||
urgency timestamp(3) without time zone DEFAULT '2099-12-31 23:59:59.999'::timestamp without time zone NOT NULL,
|
||||
"approvalState" public."ApprovalState",
|
||||
"documentInfo" jsonb DEFAULT '{"approval": {"isNeeded": null, "answeredFrom": "", "whoRequested": ""}, "tdLocation": ""}'::jsonb,
|
||||
"createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
|
||||
"documentInfo" jsonb DEFAULT '{"approval": {"isNeeded": null, "answeredFrom": "", "whoRequested": ""}, "tdLocation": ""}'::jsonb
|
||||
);
|
||||
|
||||
|
||||
@@ -582,13 +592,13 @@ CREATE TABLE public."Tour" (
|
||||
revenue double precision DEFAULT 0 NOT NULL,
|
||||
"consumptionCosts" double precision DEFAULT 0 NOT NULL,
|
||||
"revenueDeviation" double precision DEFAULT 0 NOT NULL,
|
||||
"createdAt" timestamp(3) without time zone,
|
||||
"deletedAt" timestamp(3) without time zone,
|
||||
"ticketId" uuid,
|
||||
"updatedAt" timestamp(3) without time zone,
|
||||
"companyName" text,
|
||||
"overRTW" boolean DEFAULT false NOT NULL,
|
||||
schwerlast boolean DEFAULT false NOT NULL
|
||||
"companyName" text,
|
||||
schwerlast boolean DEFAULT false NOT NULL,
|
||||
"createdAt" timestamp(3) without time zone,
|
||||
"updatedAt" timestamp(3) without time zone,
|
||||
"deletedAt" timestamp(3) without time zone,
|
||||
"ticketId" uuid
|
||||
);
|
||||
|
||||
|
||||
@@ -620,6 +630,7 @@ CREATE TABLE public."TourSource" (
|
||||
id text,
|
||||
"check" text,
|
||||
"createTime" text,
|
||||
"lastUpdate" text,
|
||||
"empfangenVonId" text,
|
||||
endgen text,
|
||||
"serienId" text,
|
||||
@@ -681,9 +692,8 @@ CREATE TABLE public."TourSource" (
|
||||
"fahrerName" text,
|
||||
fahrer text,
|
||||
color text,
|
||||
"lastUpdate" text,
|
||||
"companyName" text,
|
||||
"overRTW" text,
|
||||
"companyName" text,
|
||||
schwerlast text
|
||||
);
|
||||
|
||||
@@ -741,11 +751,11 @@ CREATE TABLE public."TourStaging" (
|
||||
revenue double precision DEFAULT 0 NOT NULL,
|
||||
"revenueDeviation" double precision DEFAULT 0 NOT NULL,
|
||||
"consumptionCosts" double precision DEFAULT 0 NOT NULL,
|
||||
"createdAt" timestamp(3) without time zone,
|
||||
"updatedAt" timestamp(3) without time zone,
|
||||
"companyName" text,
|
||||
"overRTW" boolean DEFAULT false NOT NULL,
|
||||
schwerlast boolean DEFAULT false NOT NULL
|
||||
"companyName" text,
|
||||
schwerlast boolean DEFAULT false NOT NULL,
|
||||
"createdAt" timestamp(3) without time zone,
|
||||
"updatedAt" timestamp(3) without time zone
|
||||
);
|
||||
|
||||
|
||||
@@ -812,8 +822,8 @@ CREATE TABLE public."WorkTimeStaging" (
|
||||
"departmentName" text,
|
||||
"startDate" timestamp(3) without time zone NOT NULL,
|
||||
"endDate" timestamp(3) without time zone NOT NULL,
|
||||
duration integer NOT NULL,
|
||||
pause integer NOT NULL
|
||||
pause integer NOT NULL,
|
||||
duration integer NOT NULL
|
||||
);
|
||||
|
||||
|
||||
@@ -827,22 +837,6 @@ CREATE TABLE public."_AvicennaTenantToTariffGroup" (
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: _prisma_migrations; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public._prisma_migrations (
|
||||
id character varying(36) NOT NULL,
|
||||
checksum character varying(64) NOT NULL,
|
||||
finished_at timestamp with time zone,
|
||||
migration_name character varying(255) NOT NULL,
|
||||
logs text,
|
||||
rolled_back_at timestamp with time zone,
|
||||
started_at timestamp with time zone DEFAULT now() NOT NULL,
|
||||
applied_steps_count integer DEFAULT 0 NOT NULL
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: Anomaly Anomaly_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
@@ -1115,14 +1109,6 @@ ALTER TABLE ONLY public."_AvicennaTenantToTariffGroup"
|
||||
ADD CONSTRAINT "_AvicennaTenantToTariffGroup_AB_pkey" PRIMARY KEY ("A", "B");
|
||||
|
||||
|
||||
--
|
||||
-- Name: _prisma_migrations _prisma_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public._prisma_migrations
|
||||
ADD CONSTRAINT _prisma_migrations_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: CostType_id_key; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@@ -1131,10 +1117,10 @@ CREATE UNIQUE INDEX "CostType_id_key" ON public."CostType" USING btree (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: TourFile_tourId_ticketId_idx; Type: INDEX; Schema: public; Owner: -
|
||||
-- Name: TourFile_tourId_ticketId_key; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX "TourFile_tourId_ticketId_idx" ON public."TourFile" USING btree ("tourId", "ticketId");
|
||||
CREATE UNIQUE INDEX "TourFile_tourId_ticketId_key" ON public."TourFile" USING btree ("tourId", "ticketId");
|
||||
|
||||
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user