2026-02-03 16:55:37 -06:00
|
|
|
|
namespace ApplianceRepair
|
|
|
|
|
|
{
|
|
|
|
|
|
public class ContentCardModel : ContentCardRecord
|
|
|
|
|
|
{
|
|
|
|
|
|
public ContentCardModel()
|
|
|
|
|
|
{
|
|
|
|
|
|
BelongsToPage = string.Empty;
|
|
|
|
|
|
Group = string.Empty;
|
|
|
|
|
|
Header = string.Empty;
|
|
|
|
|
|
Text = string.Empty;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public ContentCardModel(ContentCardRecord record)
|
|
|
|
|
|
{
|
|
|
|
|
|
BelongsToPage = record.BelongsToPage;
|
|
|
|
|
|
Group = record.Group;
|
|
|
|
|
|
Header = record.Header;
|
|
|
|
|
|
Text = record.Text;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class HomePageModel : HomePageRecord
|
|
|
|
|
|
{
|
2026-04-22 20:09:26 -05:00
|
|
|
|
public static string PageName = "Home";
|
2026-04-25 13:14:08 -05:00
|
|
|
|
|
2026-04-22 20:09:26 -05:00
|
|
|
|
public enum ContentCardTypes
|
|
|
|
|
|
{
|
2026-04-25 13:14:08 -05:00
|
|
|
|
Services,
|
2026-04-22 20:09:26 -05:00
|
|
|
|
Trust,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-02-03 16:55:37 -06:00
|
|
|
|
public string BusinessName { get; set; }
|
2026-04-25 13:14:08 -05:00
|
|
|
|
|
|
|
|
|
|
public string PhoneNumber { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string FormattedPhoneNumber
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!string.IsNullOrEmpty(PhoneNumber))
|
|
|
|
|
|
{
|
|
|
|
|
|
return $"({PhoneNumber[0..3]})-{PhoneNumber[3..6]}-{PhoneNumber[6..10]}";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return "";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string PhoneNumberCallLink
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!string.IsNullOrEmpty(PhoneNumber))
|
|
|
|
|
|
{
|
|
|
|
|
|
return $"tel:{PhoneNumber}";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return "";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string CopyrightText
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!string.IsNullOrEmpty(BusinessName))
|
|
|
|
|
|
{
|
|
|
|
|
|
return $"© {DateTime.Now.Year} {BusinessName}. All rights reserved.";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return $"© {DateTime.Now.Year} All rights reserved.";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-02-03 16:55:37 -06:00
|
|
|
|
|
|
|
|
|
|
public List<ContentCardModel> ServicesCards { get; set; }
|
2026-04-25 13:14:08 -05:00
|
|
|
|
|
2026-02-03 16:55:37 -06:00
|
|
|
|
public List<ContentCardModel> TrustCards { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public HomePageModel()
|
|
|
|
|
|
{
|
|
|
|
|
|
HeaderLine1 = string.Empty;
|
|
|
|
|
|
HeaderLine2 = string.Empty;
|
|
|
|
|
|
HeaderText = string.Empty;
|
2026-04-25 13:14:08 -05:00
|
|
|
|
CallHeaderText = string.Empty;
|
|
|
|
|
|
BookHeaderText = string.Empty;
|
2026-02-03 16:55:37 -06:00
|
|
|
|
SecondaryHeaderText = string.Empty;
|
|
|
|
|
|
|
2026-04-25 13:14:08 -05:00
|
|
|
|
BusinessName = string.Empty;
|
|
|
|
|
|
PhoneNumber = string.Empty;
|
2026-02-03 16:55:37 -06:00
|
|
|
|
|
|
|
|
|
|
ServicesCards = [];
|
|
|
|
|
|
TrustCards = [];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-25 13:14:08 -05:00
|
|
|
|
public HomePageModel(
|
|
|
|
|
|
HomePageRecord homePageRecord,
|
|
|
|
|
|
BusinessConfigRecord businessConfigRecord,
|
|
|
|
|
|
List<ContentCardRecord> serviceCards,
|
|
|
|
|
|
List<ContentCardRecord> trustCards)
|
2026-02-03 16:55:37 -06:00
|
|
|
|
{
|
2026-04-25 13:14:08 -05:00
|
|
|
|
HeaderLine1 = homePageRecord.HeaderLine1;
|
|
|
|
|
|
HeaderLine2 = homePageRecord.HeaderLine2;
|
|
|
|
|
|
HeaderText = homePageRecord.HeaderText;
|
|
|
|
|
|
CallHeaderText = homePageRecord.CallHeaderText;
|
|
|
|
|
|
BookHeaderText = homePageRecord.BookHeaderText;
|
|
|
|
|
|
SecondaryHeaderText = homePageRecord.SecondaryHeaderText;;
|
|
|
|
|
|
|
|
|
|
|
|
BusinessName = businessConfigRecord.Name ?? "";
|
|
|
|
|
|
PhoneNumber = businessConfigRecord.PhoneNumber ?? "";
|
2026-02-03 16:55:37 -06:00
|
|
|
|
|
|
|
|
|
|
ServicesCards = [];
|
|
|
|
|
|
TrustCards = [];
|
2026-04-25 13:14:08 -05:00
|
|
|
|
|
|
|
|
|
|
foreach (var card in serviceCards)
|
|
|
|
|
|
{
|
|
|
|
|
|
ServicesCards.Add(new ContentCardModel(card));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var card in trustCards)
|
|
|
|
|
|
{
|
|
|
|
|
|
TrustCards.Add(new ContentCardModel(card));
|
|
|
|
|
|
}
|
2026-02-03 16:55:37 -06:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-25 13:14:08 -05:00
|
|
|
|
public class RepairRequestModel : RepairRequestRecord { }
|
2026-02-03 16:55:37 -06:00
|
|
|
|
|
2026-04-25 13:14:08 -05:00
|
|
|
|
public class BusinessInfoModel : BusinessConfigRecord
|
|
|
|
|
|
{
|
|
|
|
|
|
public BusinessInfoModel(BusinessConfigRecord record)
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = record.Name;
|
|
|
|
|
|
PhoneNumber = record.PhoneNumber;
|
|
|
|
|
|
SupportEmail = record.SupportEmail;
|
|
|
|
|
|
}
|
2026-02-03 16:55:37 -06:00
|
|
|
|
}
|
|
|
|
|
|
}
|