using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Atomx.Common.Entities
{
///
/// 用户收货地址信息
///
[Table("Addresses")]
public class Address
{
///
/// 数据ID
///
[DatabaseGenerated(DatabaseGeneratedOption.None)]
[Key]
public long Id { get; set; }
///
/// 添加地址用户
///
public long UserId { get; set; }
///
/// 收件人姓名
///
[Column(TypeName = "varchar(128)")]
public string Name { get; set; } = string.Empty;
///
/// 邮件地址
///
[Column(TypeName = "varchar(256)")]
public string Email { get; set; } = string.Empty;
///
/// 电话号码
///
[Column(TypeName = "varchar(20)")]
public string Phone { get; set; } = string.Empty;
///
/// 公司
///
[Column(TypeName = "varchar(256)")]
public string Company { get; set; } = string.Empty;
///
/// 国家ID
///
public long CountryId { get; set; }
///
/// 国家
///
[Column(TypeName = "varchar(50)")]
public string Country { get; set; } = string.Empty;
///
/// 省份
///
public long ProvinceId { get; set; }
///
/// 省、州
///
[Column(TypeName = "varchar(100)")]
public string Province { get; set; } = string.Empty;
///
/// 城市
///
public long CityId { get; set; }
///
/// 城市
///
[Column(TypeName = "varchar(100)")]
public string City { get; set; } = string.Empty;
///
/// 地区
///
public long RegionId { get; set; }
///
/// 地区街
///
[Column(TypeName = "varchar(100)")]
public string Region { get; set; } = string.Empty;
///
/// 邮政编码
///
[Column(TypeName = "varchar(15)")]
public string PostalCode { get; set; } = string.Empty;
///
/// 详细地址
///
[Column(TypeName = "varchar(256)")]
public string AddressDetails { get; set; } = string.Empty;
///
/// 完整地址
///
[Column(TypeName = "varchar(1024)")]
public string FullAddress { get; set; } = string.Empty;
///
/// 地址所在经度
///
[Column(TypeName = "decimal(10,6)")]
public decimal Longitude { get; set; }
///
/// 地址所在纬度
///
[Column(TypeName = "decimal(10,6)")]
public decimal Latitude { get; set; }
///
/// 是否是虚拟地址
///
public bool IsVirtual { get; set; }
///
/// 地址使用次数
///
public int Count { get; set; }
///
/// 是否删除
///
public bool IsDelete { get; set; }
///
/// 建立时间
///
[Column(TypeName = "timestamptz")]
public DateTime CreateTime { get; set; }
///
/// 最后更新时间
///
[Column(TypeName = "timestamptz")]
public DateTime? UpdateTime { get; set; }
}
}