using Svrnty.GeoManagement.Abstractions.Abstractions; namespace Svrnty.GeoManagement.Abstractions.Models; public record GeoPoint(decimal Latitude, decimal Longitude); public record Address(bool Normalized = false) : IAddress { public required string Line1 { get; set; } public string? Line2 { get; set; } public required string City { get; set; } public required string Subdivision { get; set; } public required string PostalCode { get; set; } public required string CountryCode { get; set; } public GeoPoint? Location { get; set; } public string? Note { get; set; } public bool IsNormalized() => Normalized; public static Address CreateFrom(IAddress address, GeoPoint? location = null, string? note = null, bool normalized = false) { return new Address(normalized) { Line1 = address.Line1, Line2 = address.Line2, City = address.City, Subdivision = address.Subdivision, PostalCode = address.PostalCode, CountryCode = address.CountryCode, Location = location, Note = note, }; } }