Etapa 5 — Painel Tenant: clientes, contatos e produtos/serviços
Adiciona os módulos customers (com contatos aninhados e regra de contato principal único) e products, ambos com TenantGuard/RLS, soft delete, limite de clientes do plano e SKU único por tenant (409 amigável). Atualiza o controle de progresso e cobre os critérios de aceite com test/tenant-customers-produtos.e2e-spec.ts. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import { IsEmail, IsOptional, IsString, Length, Matches, MinLength } from 'class-validator';
|
||||
import { DOCUMENTO_MENSAGEM, DOCUMENTO_REGEX } from '../documento.util';
|
||||
|
||||
export class CreateCustomerDto {
|
||||
@IsString()
|
||||
@MinLength(2)
|
||||
razao_social: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
nome_fantasia?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Matches(DOCUMENTO_REGEX, { message: DOCUMENTO_MENSAGEM })
|
||||
documento?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsEmail()
|
||||
email?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
telefone_whatsapp?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
endereco?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
cidade?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@Length(2, 2)
|
||||
uf?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
observacoes?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user