mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-25 03:26:40 +02:00
- 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>
109 lines
2.1 KiB
TypeScript
109 lines
2.1 KiB
TypeScript
import {
|
|
IsString,
|
|
IsOptional,
|
|
IsBoolean,
|
|
IsEmail,
|
|
IsUrl,
|
|
IsUUID,
|
|
IsArray,
|
|
MaxLength,
|
|
} from 'class-validator';
|
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
|
|
export class CreateCompanyDto {
|
|
@ApiProperty({ maxLength: 200 })
|
|
@IsString()
|
|
@MaxLength(200)
|
|
name!: string;
|
|
|
|
@ApiPropertyOptional({ maxLength: 100, description: 'Freitext-Branche (Legacy)' })
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(100)
|
|
industry?: string;
|
|
|
|
@ApiPropertyOptional({ format: 'uuid', description: 'Branchen-ID' })
|
|
@IsOptional()
|
|
@IsUUID()
|
|
industryId?: string;
|
|
|
|
@ApiPropertyOptional({ format: 'uuid', description: 'Kontotyp-ID' })
|
|
@IsOptional()
|
|
@IsUUID()
|
|
accountTypeId?: string;
|
|
|
|
@ApiPropertyOptional({ format: 'uuid', description: 'Zustaendiger User (Owner-ID)' })
|
|
@IsOptional()
|
|
@IsUUID()
|
|
ownerId?: string;
|
|
|
|
@ApiPropertyOptional({ maxLength: 200, description: 'Name des zustaendigen Users' })
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(200)
|
|
ownerName?: string;
|
|
|
|
@ApiPropertyOptional({ maxLength: 255 })
|
|
@IsOptional()
|
|
@IsEmail()
|
|
@MaxLength(255)
|
|
email?: string;
|
|
|
|
@ApiPropertyOptional({ maxLength: 50 })
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(50)
|
|
phone?: string;
|
|
|
|
@ApiPropertyOptional({ maxLength: 500 })
|
|
@IsOptional()
|
|
@IsUrl()
|
|
@MaxLength(500)
|
|
website?: string;
|
|
|
|
@ApiPropertyOptional({ maxLength: 200 })
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(200)
|
|
street?: string;
|
|
|
|
@ApiPropertyOptional({ maxLength: 20 })
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(20)
|
|
zip?: string;
|
|
|
|
@ApiPropertyOptional({ maxLength: 100 })
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(100)
|
|
city?: string;
|
|
|
|
@ApiPropertyOptional({ maxLength: 100 })
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(100)
|
|
state?: string;
|
|
|
|
@ApiPropertyOptional({ maxLength: 2, default: 'DE' })
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(2)
|
|
country?: string;
|
|
|
|
@ApiPropertyOptional()
|
|
@IsOptional()
|
|
@IsString()
|
|
notes?: string;
|
|
|
|
@ApiPropertyOptional({ type: [String] })
|
|
@IsOptional()
|
|
@IsArray()
|
|
@IsString({ each: true })
|
|
tags?: string[];
|
|
|
|
@ApiPropertyOptional({ default: true })
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
isActive?: boolean;
|
|
}
|