feat: add DTOs, Dolibarr response types and mappers for Contacts, Clients, Setup and invoice lines
- New command DTOs: CreateClientDto, UpdateClientDto, CreateContactDto,
UpdateContactDto, UpdateInvoiceLineDto
- New query DTOs: ClientDetailDto, ContactDetailDto, Setup dictionaries
(PaymentTypeDto, CountryDto, CivilityDto, ContactTypeDto,
PaymentTermDto, CompanyDto)
- New Dolibarr response types for setup endpoints
- SetupMapper for all dictionary transforms
- Extended ClientResponse and ContactResponse with additional fields
(address, town, zip, country_code, note_public, note_private, etc.)
- ClientMapper: added MapToClientDetailDto for GET /Clients/{id}
- ContactMapper: added MapToContactDetailDto for GET /Contacts/{id}
2026-05-15 16:58:26 +00:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
|
|
namespace DoliMiddlewareApi.Dtos.command;
|
|
|
|
|
|
|
|
|
|
public class CreateClientDto
|
|
|
|
|
{
|
|
|
|
|
[Required]
|
|
|
|
|
[StringLength(200)]
|
|
|
|
|
public string Name { get; set; } = "";
|
|
|
|
|
|
|
|
|
|
[StringLength(50)]
|
|
|
|
|
public string? Address { get; set; }
|
|
|
|
|
|
|
|
|
|
[StringLength(50)]
|
|
|
|
|
public string? Zip { get; set; }
|
|
|
|
|
|
|
|
|
|
[StringLength(50)]
|
|
|
|
|
public string? Town { get; set; }
|
|
|
|
|
|
|
|
|
|
[StringLength(20)]
|
|
|
|
|
public string? Phone { get; set; }
|
|
|
|
|
|
|
|
|
|
[EmailAddress]
|
|
|
|
|
[StringLength(200)]
|
|
|
|
|
public string? Email { get; set; }
|
|
|
|
|
|
|
|
|
|
[StringLength(50)]
|
|
|
|
|
public string? CountryCode { get; set; }
|
|
|
|
|
|
|
|
|
|
[StringLength(50)]
|
|
|
|
|
public string? VatNumber { get; set; }
|
|
|
|
|
|
|
|
|
|
[Url]
|
|
|
|
|
[StringLength(255)]
|
|
|
|
|
public string? Url { get; set; }
|
|
|
|
|
|
|
|
|
|
[StringLength(500)]
|
|
|
|
|
public string? NotePublic { get; set; }
|
|
|
|
|
|
|
|
|
|
[StringLength(500)]
|
|
|
|
|
public string? NotePrivate { get; set; }
|
2026-05-29 14:35:17 +00:00
|
|
|
|
|
|
|
|
/// <summary>"client" | "supplier" | "both" — defaults to client</summary>
|
|
|
|
|
public string? Role { get; set; }
|
feat: add DTOs, Dolibarr response types and mappers for Contacts, Clients, Setup and invoice lines
- New command DTOs: CreateClientDto, UpdateClientDto, CreateContactDto,
UpdateContactDto, UpdateInvoiceLineDto
- New query DTOs: ClientDetailDto, ContactDetailDto, Setup dictionaries
(PaymentTypeDto, CountryDto, CivilityDto, ContactTypeDto,
PaymentTermDto, CompanyDto)
- New Dolibarr response types for setup endpoints
- SetupMapper for all dictionary transforms
- Extended ClientResponse and ContactResponse with additional fields
(address, town, zip, country_code, note_public, note_private, etc.)
- ClientMapper: added MapToClientDetailDto for GET /Clients/{id}
- ContactMapper: added MapToContactDetailDto for GET /Contacts/{id}
2026-05-15 16:58:26 +00:00
|
|
|
}
|