namespace SeaHaven.Services.DTOs
{
///
/// Contact DTO for responses
///
public class ContactDTO
{
public int Id { get; set; }
public string? FirstName { get; set; }
public string? LastName { get; set; }
public string? Email { get; set; }
public string? Phone { get; set; }
public string? Mobile { get; set; }
public string? Title { get; set; }
public string? Type { get; set; }
public int? AccountId { get; set; }
public string? AccountName { get; set; }
public DateTime? CreatedDate { get; set; }
public string? CreatedBy { get; set; }
public DateTime? ModifiedDate { get; set; }
public string? ModifiedBy { get; set; }
}
///
/// DTO for creating a new contact
///
public class CreateContactDTO
{
public required string FirstName { get; set; }
public required string LastName { get; set; }
public required string Email { get; set; }
public string? Phone { get; set; }
public string? Mobile { get; set; }
public string? Title { get; set; }
public string? Type { get; set; }
public int? AccountId { get; set; }
}
///
/// DTO for updating an existing contact
///
public class UpdateContactDTO
{
public string? FirstName { get; set; }
public string? LastName { get; set; }
public string? Email { get; set; }
public string? Phone { get; set; }
public string? Mobile { get; set; }
public string? Title { get; set; }
public string? Type { get; set; }
public int? AccountId { get; set; }
}
///
/// Paged result wrapper
///
public class PagedResult
{
public IEnumerable Items { get; set; } = new List();
public int TotalCount { get; set; }
public int Page { get; set; }
public int PageSize { get; set; }
public int TotalPages => (int)Math.Ceiling(TotalCount / (double)PageSize);
public bool HasPrevious => Page > 1;
public bool HasNext => Page < TotalPages;
}
}