mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-25 03:46:40 +02:00
Backend: TradeEvent Prisma model, NestJS CRUD module with date validation and tenant isolation. Frontend: Admin Events page with create/edit/delete modals, dashboard countdown tiles showing upcoming/ongoing/ended events with progress bars, and useEventCountdown hook for live timer updates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
64 lines
1.2 KiB
TypeScript
64 lines
1.2 KiB
TypeScript
import {
|
|
IsString,
|
|
IsOptional,
|
|
IsBoolean,
|
|
IsInt,
|
|
IsDateString,
|
|
IsUrl,
|
|
MaxLength,
|
|
Min,
|
|
} from 'class-validator';
|
|
import { ApiPropertyOptional } from '@nestjs/swagger';
|
|
|
|
export class UpdateTradeEventDto {
|
|
@ApiPropertyOptional({ maxLength: 200 })
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(200)
|
|
name?: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(2000)
|
|
description?: string;
|
|
|
|
@ApiPropertyOptional({ description: 'Startdatum (ISO 8601)' })
|
|
@IsOptional()
|
|
@IsDateString()
|
|
startDate?: string;
|
|
|
|
@ApiPropertyOptional({ description: 'Enddatum (ISO 8601)' })
|
|
@IsOptional()
|
|
@IsDateString()
|
|
endDate?: string;
|
|
|
|
@ApiPropertyOptional({ maxLength: 300 })
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(300)
|
|
location?: string;
|
|
|
|
@ApiPropertyOptional({ maxLength: 200 })
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(200)
|
|
boothInfo?: string;
|
|
|
|
@ApiPropertyOptional({ maxLength: 500 })
|
|
@IsOptional()
|
|
@IsUrl({}, { message: 'websiteUrl muss eine gueltige URL sein' })
|
|
@MaxLength(500)
|
|
websiteUrl?: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
isActive?: boolean;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsInt()
|
|
@Min(0)
|
|
sortOrder?: number;
|
|
}
|