shoc-backend/Api.SeaHavenIndustries/DTOs/EditLocation_DTO.cs

38 lines
1.2 KiB
C#
Raw Normal View History

2026-05-06 10:49:33 -05:00
using SeaHaven.Services.DTOs;
namespace Api.SeaHavenIndustries.DTOs
2024-09-28 14:58:36 -04:00
{
public class EditLocation_DTO
{
public int Id { get; set; }
public string? Title { get; set; }
public string? Name { get; set; }
public string? Address { get; set; }
public string? City { get; set; }
public string? State { get; set; }
public string? ZipCode { get; set; }
public string? Phone { get; set; }
public string? Contact { get; set; }
public string? ContactEmail { get; set; }
public string? Status { get; set; }
public string? AccountId { get; set; }
public string? Notes { get; set; }
public List<SiteContactInput_DTO>? Contacts { get; set; }
public int? GetAccountId() => LocationAccountIdMapping.ParseOptional(AccountId);
2026-05-06 10:49:33 -05:00
// ✅ Map API DTO to Service DTO
public UpdateLocationDTO ToServiceUpdateDTO()
{
return new UpdateLocationDTO
{
LocationName = this.Name,
Address = this.Address,
City = this.City,
State = this.State,
Zipcode = this.ZipCode
2026-05-06 10:49:33 -05:00
};
}
2024-09-28 14:58:36 -04:00
}
}