turash/bugulma/frontend/schemas/historical.ts
Damir Mukimov 6347f42e20
Consolidate repositories: Remove nested frontend .git and merge into main repository
- Remove nested git repository from bugulma/frontend/.git
- Add all frontend files to main repository tracking
- Convert from separate frontend/backend repos to unified monorepo
- Preserve all frontend code and development history as tracked files
- Eliminate nested repository complexity for simpler development workflow

This creates a proper monorepo structure with frontend and backend
coexisting in the same repository for easier development and deployment.
2025-11-25 06:02:57 +01:00

31 lines
1.3 KiB
TypeScript

import { z } from 'zod';
import { locationSchema } from '@/schemas/location';
import { idSchema, nameSchema, optionalUrlSchema } from '@/schemas/common';
/**
* Historical landmark schema
* Uses Zod v4's composition features and common schemas for DRY code
*/
export const historicalLandmarkSchema = z.object({
id: idSchema,
name: nameSchema.min(3, { message: 'Название должно быть длиннее.' }),
address: z.string().optional().describe('Landmark address'),
period: z.string().describe('Historical period'),
builder: z.string().optional().describe('Builder name'),
architect: z.string().optional().describe('Architect name'),
originalPurpose: z
.string()
.min(3, { message: 'Описание должно быть длиннее.' })
.describe('Original purpose'),
currentStatus: z
.string()
.min(3, { message: 'Описание должно быть длиннее.' })
.describe('Current status'),
historicalNotes: z.array(z.string()).optional().describe('Historical notes'),
imageUrl: optionalUrlSchema.describe('Image URL'),
location: locationSchema,
relatedOrgId: idSchema.optional().describe('Related organization ID'),
});
export type HistoricalLandmark = z.infer<typeof historicalLandmarkSchema>;