save, create and view reports in dashboard
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { ChartType } from "@prisma/client";
|
||||
import { z } from "zod";
|
||||
|
||||
export const zChartEvent = z.object({
|
||||
@@ -19,6 +20,16 @@ export const zChartBreakdown = z.object({
|
||||
export const zChartEvents = z.array(zChartEvent);
|
||||
export const zChartBreakdowns = z.array(zChartBreakdown);
|
||||
|
||||
export const zChartType = z.enum(["bar", "linear"]);
|
||||
export const zChartType = z.enum(['linear', 'bar', 'pie', 'metric', 'area']);
|
||||
|
||||
export const zTimeInterval = z.enum(["day", "hour", "month"]);
|
||||
|
||||
export const zChartInput = z.object({
|
||||
name: z.string(),
|
||||
startDate: z.date(),
|
||||
endDate: z.date(),
|
||||
chartType: zChartType,
|
||||
interval: zTimeInterval,
|
||||
events: zChartEvents,
|
||||
breakdowns: zChartBreakdowns,
|
||||
})
|
||||
Reference in New Issue
Block a user