57 lines
1.8 KiB
C#
57 lines
1.8 KiB
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
using AyCode.Interfaces.Entities;
|
|
using AyCode.Entities.Locations;
|
|
using AyCode.Interfaces.TimeStampInfo;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Text.RegularExpressions;
|
|
using TIAM.Core.Enums;
|
|
using TIAM.Entities.Addresses;
|
|
|
|
namespace TIAM.Entities.TransferDestinations
|
|
{
|
|
[Table("TransferDestination")]
|
|
public class TransferDestination : IEntityGuid, ITimeStampInfo //LocationBase
|
|
{
|
|
[Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
|
|
public Guid Id { get; set; }
|
|
|
|
public Guid AddressId { get; set; }
|
|
public virtual Address Address { get; set; }
|
|
|
|
//[Required(ErrorMessage = "The Username value should be specified.")]
|
|
public string Name { get; set; }
|
|
|
|
public string Description { get; set; }
|
|
|
|
public double Price { get; set; }
|
|
public PriceType PriceType { 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;
|
|
}
|
|
}
|
|
|
|
}
|
|
|