mirror of
https://github.com/azaion/flights.git
synced 2026-04-22 12:36:32 +00:00
Initial commit
Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using LinqToDB.Mapping;
|
||||
using Azaion.Flights.Enums;
|
||||
|
||||
namespace Azaion.Flights.Database.Entities;
|
||||
|
||||
[Table("flights")]
|
||||
public class Flight
|
||||
{
|
||||
[PrimaryKey]
|
||||
[Column("id")]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Column("created_date")]
|
||||
public DateTime CreatedDate { get; set; }
|
||||
|
||||
[Column("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[Column("aircraft_id")]
|
||||
public Guid AircraftId { get; set; }
|
||||
|
||||
[Association(ThisKey = nameof(AircraftId), OtherKey = nameof(Aircraft.Id))]
|
||||
public Aircraft? Aircraft { get; set; }
|
||||
|
||||
[Association(ThisKey = nameof(Id), OtherKey = nameof(Waypoint.FlightId))]
|
||||
public List<Waypoint> Waypoints { get; set; } = [];
|
||||
}
|
||||
Reference in New Issue
Block a user