mirror of
https://github.com/azaion/flights.git
synced 2026-04-22 21:36:31 +00:00
0625cd4157
Made-with: Cursor
28 lines
691 B
C#
28 lines
691 B
C#
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; } = [];
|
|
}
|