Skip to content
Snippets Groups Projects
Commit a1767c94 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

comment schema

parent a63b3880
No related branches found
No related tags found
2 merge requests!223reset the pin numbers before search results are fetch (so the results will be...,!200Resolve "[MIN-113] Show comments on the map"
import { z } from 'zod';
const coordinatesSchema = z.object({
x: z.number(),
y: z.number(),
});
export const commentSchema = z.object({
title: z.string(),
icon: z.string(),
type: z.enum(['POINT', 'ALIAS', 'REACTION']),
content: z.string(),
removed: z.boolean(),
coord: coordinatesSchema,
modelId: z.number(),
elementId: z.string(),
id: z.number(),
pinned: z.boolean(),
owner: z.string().optional(),
});
import { Comment } from './models';
import { PinType } from './pin';
export interface CommentWithPinType extends Comment {
pinType: PinType;
}
...@@ -61,6 +61,7 @@ import { targetSchema } from '@/models/targetSchema'; ...@@ -61,6 +61,7 @@ import { targetSchema } from '@/models/targetSchema';
import { targetSearchNameResult } from '@/models/targetSearchNameResult'; import { targetSearchNameResult } from '@/models/targetSearchNameResult';
import { userPrivilegesSchema } from '@/models/userPrivilegesSchema'; import { userPrivilegesSchema } from '@/models/userPrivilegesSchema';
import { z } from 'zod'; import { z } from 'zod';
import { commentSchema } from '@/models/commentSchema';
export type Project = z.infer<typeof projectSchema>; export type Project = z.infer<typeof projectSchema>;
export type OverviewImageView = z.infer<typeof overviewImageView>; export type OverviewImageView = z.infer<typeof overviewImageView>;
...@@ -118,3 +119,4 @@ export type MarkerSurface = z.infer<typeof markerSurfaceSchema>; ...@@ -118,3 +119,4 @@ export type MarkerSurface = z.infer<typeof markerSurfaceSchema>;
export type MarkerLine = z.infer<typeof markerLineSchema>; export type MarkerLine = z.infer<typeof markerLineSchema>;
export type MarkerWithPosition = z.infer<typeof markerWithPositionSchema>; export type MarkerWithPosition = z.infer<typeof markerWithPositionSchema>;
export type Marker = z.infer<typeof markerSchema>; export type Marker = z.infer<typeof markerSchema>;
export type Comment = z.infer<typeof commentSchema>;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment