INSIGHT-MVP/packages/crm-service/src/industries/dto/create-industry.dto.ts
Thomas Reitz 0ed1e77844 feat(crm): add company detail overhaul with industries, account types, relationship types
- Backend: new CRUD services/controllers for Industries, AccountTypes,
  RelationshipTypes, CompanyRelationships with Prisma schema migration
- Frontend: new hooks, API functions, and types for all config entities
- CompanyDetailPage redesign with ActivityFeed, RelationshipsCard
- CompanyFormModal extended with industry, account type, owner fields
- Activities service now supports companyId filter + includeContacts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 09:21:57 +01:00

35 lines
754 B
TypeScript

import {
IsString,
IsOptional,
IsInt,
MaxLength,
Matches,
Min,
} from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
export class CreateIndustryDto {
@ApiProperty({ maxLength: 100, description: 'Name der Branche' })
@IsString()
@MaxLength(100)
name!: string;
@ApiPropertyOptional({
maxLength: 7,
default: '#6B7280',
description: 'Hex-Farbcode (z.B. #3B82F6)',
})
@IsOptional()
@IsString()
@MaxLength(7)
@Matches(/^#[0-9A-Fa-f]{6}$/, {
message: 'color muss ein gueltiger Hex-Farbcode sein (z.B. #3B82F6)',
})
color?: string;
@ApiPropertyOptional({ default: 0, description: 'Sortierreihenfolge' })
@IsOptional()
@IsInt()
@Min(0)
sortOrder?: number;
}