feat: Añado mas campos utiles para los terceros
This commit is contained in:
parent
9e888ee985
commit
45e4af5b39
|
|
@ -10,6 +10,12 @@ public class ClientResponse
|
|||
// Código cliente (CUxxxx)
|
||||
public string? code_client { get; set; }
|
||||
|
||||
// Tipo de entidad
|
||||
public string? typent_code { get; set; }
|
||||
|
||||
// Estado
|
||||
public string? status { get; set; }
|
||||
|
||||
// Contacto
|
||||
public string? email { get; set; }
|
||||
public string? phone { get; set; }
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@ public class ClientDto
|
|||
public int Id { get; set; }
|
||||
public required string? Name { get; set; }
|
||||
public required string? CodeClient { get; set; }
|
||||
public string? TypentCode { get; set; }
|
||||
public string? Status { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Phone { get; set; }
|
||||
|
||||
public List<ContactDto> Contacts { get; set; } = new();
|
||||
}
|
||||
|
|
@ -15,6 +15,10 @@ public class ClientMapper
|
|||
Id = clientId,
|
||||
Name = clientResponse.name,
|
||||
CodeClient = clientResponse.code_client,
|
||||
TypentCode = clientResponse.typent_code,
|
||||
Status = clientResponse.status,
|
||||
Email = clientResponse.email,
|
||||
Phone = clientResponse.phone,
|
||||
Contacts = contacts.Where(c => c.ClientId == clientId).ToList()
|
||||
};
|
||||
}
|
||||
|
|
@ -25,7 +29,11 @@ public class ClientMapper
|
|||
{
|
||||
Id = int.TryParse(clientResponse.id, out int id) ? id : 0,
|
||||
Name = clientResponse.name,
|
||||
CodeClient = clientResponse.code_client
|
||||
CodeClient = clientResponse.code_client,
|
||||
TypentCode = clientResponse.typent_code,
|
||||
Status = clientResponse.status,
|
||||
Email = clientResponse.email,
|
||||
Phone = clientResponse.phone
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue