TourIAm/TIAM.Entities/Transfers/TransferDestination.cs

60 lines
2.1 KiB
C#

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, 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<Product> Products { get; set; }
//public virtual List<TransferDestinationToProduct> TransferDestinationToProducts { get; set; }
public string Name { get; set; }
public string Description { get; set; }
//public PriceType PriceType { get; set; }
public double Price { get; set; }
public double Price2 { get; set; }
public double Price3 { 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, double price, double price2, double price3) : this(id, addressString)
{
Name = name;
}
public TransferDestination(Guid id, string name, string description, string addressString, double price, double price2, double price3) : this(id, name, addressString, price, price2, price3)
{
Description = description;
}
}
}