using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using AyCode.Interfaces.Entities; using AyCode.Interfaces.TimeStampInfo; using TIAM.Core.Enums; using TIAM.Entities.Addresses; namespace TIAM.Entities.Transfers { [Table("TransferDestination")] public class TransferDestination : IEntityGuid, ITransfeDestinationPrices, ITimeStampInfo //LocationBase { [Key, DatabaseGenerated(DatabaseGeneratedOption.None)] public Guid Id { get; set; } public Guid AddressId { get; set; } [ForeignKey(nameof(AddressId))] public virtual Address Address { get; set; } //public virtual List Products { get; set; } //public virtual List TransferDestinationToProducts { get; set; } public string Name { get; set; } public string Description { get; set; } public double Price { get; set; } public double? Price2 { get; set; } public double? Price3 { get; set; } public double ProductCommis { get;set; } public double ExtraPrice { get; set; } ///// ///// Kihajtás v. behajtás az ExtraPrice! Ha null, akkor mindkettő... ///// //public TransferExtraPriceType ExtraPriceType { get; set; } //TEMPORARY!!! public string? AddressString { get; set; } public DateTime Created { get; set; } public DateTime Modified { get; set; } public TransferDestination() { } public TransferDestination(string addressString) : this(Guid.NewGuid(), addressString) { } //public TransferDestination(Guid id, double latitude, double longitude, string address) : base(id, latitude, longitude, address) { } public TransferDestination(Guid id, string addressString) { Id = id; AddressString = addressString; } public TransferDestination(Guid id, string name, string addressString) : this(id, addressString) { Name = name; } public TransferDestination(Guid id, string name, string description, string addressString) : this(id, name, addressString) { Description = description; } } }