AyCode.Core/AyCode.Entities/Locations/LocationBase.cs

40 lines
1.0 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AyCode.Interfaces.Locations;
namespace AyCode.Entities.Locations
{
//[Table("Locations")]
public abstract class LocationBase : ILocationBase
{
public LocationBase() { }
public LocationBase(double longitude, double latitude, string? address) : this(Guid.NewGuid(), longitude, latitude, address) { }
public LocationBase(Guid id, double longitude, double latitude , string? address) : this()
{
Id = id;
Longitude = longitude;
Latitude = latitude;
Address = address;
}
[Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
public Guid Id { get; set; }
public double Longitude { get; set; }
public double Latitude { get; set; }
public string? Address { get; set; }
}
}