diff --git a/Net.Vatprc.Uniapi.UI.Event/package.json b/Net.Vatprc.Uniapi.UI.Event/package.json
index d9c29e8..f95f1c6 100644
--- a/Net.Vatprc.Uniapi.UI.Event/package.json
+++ b/Net.Vatprc.Uniapi.UI.Event/package.json
@@ -5,7 +5,7 @@
"private": true,
"type": "module",
"scripts": {
- "dev": "vite --port 3000",
+ "dev": "vite --port 3000 --open",
"build": "vite build",
"serve": "vite preview",
"lint:eslint": "eslint 'src/**/*.{ts,tsx}'",
diff --git a/Net.Vatprc.Uniapi.UI.Event/src/api.d.ts b/Net.Vatprc.Uniapi.UI.Event/src/api.d.ts
index 5be3b8e..4392f36 100644
--- a/Net.Vatprc.Uniapi.UI.Event/src/api.d.ts
+++ b/Net.Vatprc.Uniapi.UI.Event/src/api.d.ts
@@ -313,6 +313,8 @@ export interface components {
enter_at: string;
/** Format: date-time */
leave_at?: string | null;
+ callsign?: string | null;
+ aircraft_type_icao?: string | null;
};
ErrorProdResponse: {
error_code: string;
@@ -370,6 +372,8 @@ export interface components {
/** Format: date-time */
updated_at: string;
booking?: components["schemas"]["EventBookingDto"];
+ callsign?: string | null;
+ aircraft_type_icao?: string | null;
};
LoginResDto: {
access_token: string;
@@ -423,6 +427,8 @@ export interface components {
enter_at: string;
/** Format: date-time */
leave_at?: string | null;
+ callsign?: string | null;
+ aircraft_type_icao?: string | null;
};
UserDto: {
id: string;
diff --git a/Net.Vatprc.Uniapi.UI.Event/src/components/datetime.tsx b/Net.Vatprc.Uniapi.UI.Event/src/components/datetime.tsx
index 9ecd826..4fc0f47 100644
--- a/Net.Vatprc.Uniapi.UI.Event/src/components/datetime.tsx
+++ b/Net.Vatprc.Uniapi.UI.Event/src/components/datetime.tsx
@@ -19,7 +19,12 @@ export const DateTime = ({
return (
<>
- {formatInTimeZone(time, "UTC", noDate ? "HH:mm" : "yyyy-MM-dd HH:mm")}Z
+
+ {formatInTimeZone(time, "UTC", noDate ? "HHmm" : "yyyy-MM-dd HH:mm")}
+
+ Z
+
+
{!noDistance && (
diff --git a/Net.Vatprc.Uniapi.UI.Event/src/components/slot-button-book.tsx b/Net.Vatprc.Uniapi.UI.Event/src/components/slot-button-book.tsx
index 71fb1ce..75a779c 100644
--- a/Net.Vatprc.Uniapi.UI.Event/src/components/slot-button-book.tsx
+++ b/Net.Vatprc.Uniapi.UI.Event/src/components/slot-button-book.tsx
@@ -1,3 +1,4 @@
+import { DateTime } from "./datetime";
import { paths } from "@/api";
import { invalidatePath, useApi, useApiPut } from "@/client";
import { useUser } from "@/services/auth";
@@ -54,7 +55,13 @@ export const SlotBookButton = ({
- Do you want to book this slot?
+
+ Do you want to book the slot for {slot?.airspace?.name} at{" "}
+
+ {slot.enter_at}
+
+ ?
+
{slot?.airspace?.name}
+ {slot?.callsign && (
+
+
+ Callsign:
+
+ {slot?.callsign}
+
+ )}
+ {slot?.aircraft_type_icao && (
+
+
+ Aircraft Type:
+
+ {slot?.aircraft_type_icao}
+
+ )}
Times:
@@ -101,8 +117,10 @@ export const SlotDetail = ({ eventId, slotId }: { eventId: string; slotId: strin
)}
Event briefing
+ {!event?.description && No briefing available.}
{event?.description}
Area briefing
+ {!slot?.airspace.description && No briefing available.}
{slot?.airspace.description}
diff --git a/Net.Vatprc.Uniapi.UI.Event/src/components/slot-import.tsx b/Net.Vatprc.Uniapi.UI.Event/src/components/slot-import.tsx
index 4574c4e..3723a62 100644
--- a/Net.Vatprc.Uniapi.UI.Event/src/components/slot-import.tsx
+++ b/Net.Vatprc.Uniapi.UI.Event/src/components/slot-import.tsx
@@ -17,6 +17,8 @@ interface Slot {
icao_codes: string[];
enter_at: Date;
leave_at?: Date;
+ callsign?: string;
+ aircraft_type_icao?: string;
}
export const ImportSlot = ({ eventId }: { eventId: string }) => {
@@ -33,13 +35,15 @@ export const ImportSlot = ({ eventId }: { eventId: string }) => {
data
.split("\n")
.map((line) => {
- const [dep, dep_time, arr, arr_time] = line.split(",");
+ const [dep, dep_time, arr, arr_time, callsign, aircraft_type_icao] = line.split(",");
if (!dep || !dep_time || !arr) return;
return {
airspace: `${dep} - ${arr}`,
icao_codes: [dep, arr],
- enter_at: fromZonedTime(parse(dep_time ?? "", "yyyy/MM/dd HH:mm:ss", Date.now()), "UTC"),
- leave_at: arr_time ? fromZonedTime(parse(arr_time, "yyyy/MM/dd HH:mm:ss", Date.now()), "UTC") : undefined,
+ enter_at: fromZonedTime(parse(dep_time ?? "", "yyyy-MM-dd HH:mm", Date.now()), "UTC"),
+ leave_at: arr_time ? fromZonedTime(parse(arr_time, "yyyy-MM-dd HH:mm", Date.now()), "UTC") : undefined,
+ callsign: callsign,
+ aircraft_type_icao: aircraft_type_icao,
};
})
.filter((x) => !!x),
@@ -65,6 +69,8 @@ export const ImportSlot = ({ eventId }: { eventId: string }) => {
airspace_id: airspaces.find((a) => a.data?.name === slot.airspace)?.data?.id ?? "",
enter_at: slot.enter_at.toISOString(),
leave_at: slot.leave_at?.toISOString(),
+ callsign: slot.callsign,
+ aircraft_type_icao: slot.aircraft_type_icao,
},
}),
),
@@ -87,6 +93,10 @@ export const ImportSlot = ({ eventId }: { eventId: string }) => {
+
+ File format: CSV with dep, dep_time (yyyy-MM-dd HH:mm), arr, arr_time (yyyy-MM-dd HH:mm), callsign,
+ aircraft_type_icao
+
wrapPromiseWithToast(onDrop(f))}>
@@ -112,6 +122,8 @@ export const ImportSlot = ({ eventId }: { eventId: string }) => {
Area
Enter at
+ Callsign
+ Aircraft Type
@@ -122,14 +134,16 @@ export const ImportSlot = ({ eventId }: { eventId: string }) => {
CTOT
- {slot.enter_at}
+ {slot.enter_at}
TTA
- {slot.enter_at}
+ {slot.enter_at}
+ {slot.callsign}
+ {slot.aircraft_type_icao}
))}
diff --git a/Net.Vatprc.Uniapi.UI.Event/src/routes/events/$event_id.tsx b/Net.Vatprc.Uniapi.UI.Event/src/routes/events/$event_id.tsx
index bb675ae..33619b7 100644
--- a/Net.Vatprc.Uniapi.UI.Event/src/routes/events/$event_id.tsx
+++ b/Net.Vatprc.Uniapi.UI.Event/src/routes/events/$event_id.tsx
@@ -31,19 +31,31 @@ const EventComponent = () => {
{slot.airspace.name}
-
+
CTOT
- {slot.enter_at}
+
+ {slot.enter_at}
+
{slot.leave_at && (
TTA
- {slot.leave_at}
+
+ {slot.leave_at}
+
)}
-
+
+ {!!slot.callsign || !!slot.aircraft_type_icao ? (
+
+ {slot.callsign}
+ {slot.aircraft_type_icao && ` with ${slot.aircraft_type_icao}`}
+
+ ) : (
+ Not designated
+ )}
@@ -83,6 +95,7 @@ const EventComponent = () => {
Area
Time
+ Callsign & Aircraft
diff --git a/Net.Vatprc.Uniapi/Controllers/EventSlotController.cs b/Net.Vatprc.Uniapi/Controllers/EventSlotController.cs
index f8e92cc..004df95 100644
--- a/Net.Vatprc.Uniapi/Controllers/EventSlotController.cs
+++ b/Net.Vatprc.Uniapi/Controllers/EventSlotController.cs
@@ -33,6 +33,8 @@ public record EventSlotDto
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset UpdatedAt { get; set; }
public EventSlotBookingController.EventBookingDto? Booking { get; set; }
+ public string? Callsign { get; set; }
+ public string? AircraftTypeIcao { get; set; }
public EventSlotDto(EventSlot slot)
{
@@ -45,6 +47,8 @@ public EventSlotDto(EventSlot slot)
UpdatedAt = slot.UpdatedAt;
LeaveAt = slot.LeaveAt;
if (slot.Booking != null) Booking = new(slot.Booking);
+ Callsign = slot.Callsign;
+ AircraftTypeIcao = slot.AircraftTypeIcao;
}
}
@@ -91,6 +95,8 @@ public record CreateEventSlotDto
public required Ulid AirspaceId { get; set; }
public required DateTimeOffset EnterAt { get; set; }
public DateTimeOffset? LeaveAt { get; set; }
+ public string? Callsign { get; set; }
+ public string? AircraftTypeIcao { get; set; }
}
[HttpPost]
@@ -104,6 +110,8 @@ public async Task Create(Ulid eid, CreateEventSlotDto dto)
EventAirspace = airspace,
EnterAt = dto.EnterAt.ToUniversalTime(),
LeaveAt = dto.LeaveAt?.ToUniversalTime(),
+ Callsign = dto.Callsign,
+ AircraftTypeIcao = dto.AircraftTypeIcao,
};
DbContext.EventSlot.Add(slot);
await DbContext.SaveChangesAsync();
@@ -114,6 +122,8 @@ public record UpdateEventSlotDto
{
public required DateTimeOffset EnterAt { get; set; }
public DateTimeOffset? LeaveAt { get; set; }
+ public string? Callsign { get; set; }
+ public string? AircraftTypeIcao { get; set; }
}
[HttpPut("{sid}")]
@@ -123,6 +133,8 @@ public async Task Update(Ulid eid, Ulid sid, UpdateEventSlotDto dt
var slot = await LoadAsync(eid, sid);
slot.EnterAt = dto.EnterAt;
slot.LeaveAt = dto.LeaveAt;
+ slot.Callsign = dto.Callsign;
+ slot.AircraftTypeIcao = dto.AircraftTypeIcao;
await DbContext.SaveChangesAsync();
return new(slot);
}
diff --git a/Net.Vatprc.Uniapi/Migrations/20240915052017_EventSlotAddCallsignAndAircraftType.Designer.cs b/Net.Vatprc.Uniapi/Migrations/20240915052017_EventSlotAddCallsignAndAircraftType.Designer.cs
new file mode 100644
index 0000000..428d55b
--- /dev/null
+++ b/Net.Vatprc.Uniapi/Migrations/20240915052017_EventSlotAddCallsignAndAircraftType.Designer.cs
@@ -0,0 +1,546 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Net.Vatprc.Uniapi;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace Net.Vatprc.Uniapi.Migrations
+{
+ [DbContext(typeof(VATPRCContext))]
+ [Migration("20240915052017_EventSlotAddCallsignAndAircraftType")]
+ partial class EventSlotAddCallsignAndAircraftType
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.2")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.Event", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("description");
+
+ b.Property("EndAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("end_at");
+
+ b.Property("EndBookingAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("end_booking_at");
+
+ b.Property("ImageUrl")
+ .HasColumnType("text")
+ .HasColumnName("image_url");
+
+ b.Property("StartAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("start_at");
+
+ b.Property("StartBookingAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("start_booking_at");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("title");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("updated_at")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP");
+
+ b.HasKey("Id")
+ .HasName("pk_event");
+
+ b.ToTable("event", (string)null);
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.EventAirspace", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("description");
+
+ b.Property("EventId")
+ .HasColumnType("uuid")
+ .HasColumnName("event_id");
+
+ b.Property("IcaoCodes")
+ .IsRequired()
+ .HasColumnType("text[]")
+ .HasColumnName("icao_codes");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("name");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("updated_at")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP");
+
+ b.HasKey("Id")
+ .HasName("pk_event_airspace");
+
+ b.HasIndex("EventId")
+ .HasDatabaseName("ix_event_airspace_event_id");
+
+ b.ToTable("event_airspace", (string)null);
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.EventBooking", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP");
+
+ b.Property("EventSlotId")
+ .HasColumnType("uuid")
+ .HasColumnName("event_slot_id");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("updated_at")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP");
+
+ b.Property("UserId")
+ .HasColumnType("uuid")
+ .HasColumnName("user_id");
+
+ b.HasKey("Id")
+ .HasName("pk_event_booking");
+
+ b.HasIndex("EventSlotId")
+ .IsUnique()
+ .HasDatabaseName("ix_event_booking_event_slot_id");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("ix_event_booking_user_id");
+
+ b.ToTable("event_booking", (string)null);
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.EventSlot", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("AircraftTypeIcao")
+ .HasColumnType("text")
+ .HasColumnName("aircraft_type_icao");
+
+ b.Property("Callsign")
+ .HasColumnType("text")
+ .HasColumnName("callsign");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP");
+
+ b.Property("EnterAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("enter_at");
+
+ b.Property("EventAirspaceId")
+ .HasColumnType("uuid")
+ .HasColumnName("event_airspace_id");
+
+ b.Property("LeaveAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("leave_at");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("updated_at")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP");
+
+ b.HasKey("Id")
+ .HasName("pk_event_slot");
+
+ b.HasIndex("EventAirspaceId")
+ .HasDatabaseName("ix_event_slot_event_airspace_id");
+
+ b.ToTable("event_slot", (string)null);
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.Notam", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("description");
+
+ b.Property("EffectiveFrom")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("effective_from");
+
+ b.Property("ExpireAfter")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("expire_after");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("title");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("updated_at")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP");
+
+ b.HasKey("Id")
+ .HasName("pk_notam");
+
+ b.ToTable("notam", (string)null);
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.NotamBinding", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP");
+
+ b.Property("Discriminator")
+ .IsRequired()
+ .HasMaxLength(34)
+ .HasColumnType("character varying(34)")
+ .HasColumnName("discriminator");
+
+ b.Property("NotamId")
+ .HasColumnType("uuid")
+ .HasColumnName("notam_id");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("updated_at")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP");
+
+ b.HasKey("Id")
+ .HasName("pk_notam_binding");
+
+ b.HasIndex("NotamId")
+ .HasDatabaseName("ix_notam_binding_notam_id");
+
+ b.ToTable("notam_binding", (string)null);
+
+ b.HasDiscriminator("Discriminator").HasValue("NotamBinding");
+
+ b.UseTphMappingStrategy();
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.Session", b =>
+ {
+ b.Property("Token")
+ .HasColumnType("uuid")
+ .HasColumnName("token");
+
+ b.Property("Code")
+ .HasColumnType("uuid")
+ .HasColumnName("code");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP");
+
+ b.Property("ExpiresIn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("expires_in");
+
+ b.Property("UserId")
+ .HasColumnType("uuid")
+ .HasColumnName("user_id");
+
+ b.Property("UserUpdatedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("user_updated_at");
+
+ b.HasKey("Token")
+ .HasName("pk_session");
+
+ b.HasIndex("UserId")
+ .HasDatabaseName("ix_session_user_id");
+
+ b.ToTable("session", (string)null);
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.User", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("Cid")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("cid");
+
+ b.Property("CreatedAt")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_at")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP");
+
+ b.Property("FullName")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("full_name");
+
+ b.Property("Roles")
+ .IsRequired()
+ .HasColumnType("text[]")
+ .HasColumnName("roles");
+
+ b.Property("UpdatedAt")
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("updated_at")
+ .HasDefaultValueSql("CURRENT_TIMESTAMP");
+
+ b.HasKey("Id")
+ .HasName("pk_user");
+
+ b.HasIndex("Cid")
+ .IsUnique()
+ .HasDatabaseName("ix_user_cid");
+
+ b.ToTable("user", (string)null);
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.NotamBindingEvent", b =>
+ {
+ b.HasBaseType("Net.Vatprc.Uniapi.Models.NotamBinding");
+
+ b.Property("EventId")
+ .HasColumnType("uuid")
+ .HasColumnName("event_id");
+
+ b.HasIndex("EventId")
+ .HasDatabaseName("ix_notam_binding_event_id");
+
+ b.ToTable("notam_binding", (string)null);
+
+ b.HasDiscriminator().HasValue("NotamBindingEvent");
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.NotamBindingEventAirspace", b =>
+ {
+ b.HasBaseType("Net.Vatprc.Uniapi.Models.NotamBinding");
+
+ b.Property("EventAirspaceId")
+ .HasColumnType("uuid")
+ .HasColumnName("event_airspace_id");
+
+ b.HasIndex("EventAirspaceId")
+ .HasDatabaseName("ix_notam_binding_event_airspace_id");
+
+ b.ToTable("notam_binding", (string)null);
+
+ b.HasDiscriminator().HasValue("NotamBindingEventAirspace");
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.NotamBindingIcaoCode", b =>
+ {
+ b.HasBaseType("Net.Vatprc.Uniapi.Models.NotamBinding");
+
+ b.Property("IcaoCode")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("icao_code");
+
+ b.HasIndex("IcaoCode")
+ .HasDatabaseName("ix_notam_binding_icao_code");
+
+ b.ToTable("notam_binding", (string)null);
+
+ b.HasDiscriminator().HasValue("NotamBindingIcaoCode");
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.EventAirspace", b =>
+ {
+ b.HasOne("Net.Vatprc.Uniapi.Models.Event", "Event")
+ .WithMany("Airspaces")
+ .HasForeignKey("EventId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_event_airspace_event_event_id");
+
+ b.Navigation("Event");
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.EventBooking", b =>
+ {
+ b.HasOne("Net.Vatprc.Uniapi.Models.EventSlot", "EventSlot")
+ .WithOne("Booking")
+ .HasForeignKey("Net.Vatprc.Uniapi.Models.EventBooking", "EventSlotId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_event_booking_event_slot_event_slot_id");
+
+ b.HasOne("Net.Vatprc.Uniapi.Models.User", "User")
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_event_booking_user_user_id");
+
+ b.Navigation("EventSlot");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.EventSlot", b =>
+ {
+ b.HasOne("Net.Vatprc.Uniapi.Models.EventAirspace", "EventAirspace")
+ .WithMany("Slots")
+ .HasForeignKey("EventAirspaceId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_event_slot_event_airspace_event_airspace_id");
+
+ b.Navigation("EventAirspace");
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.NotamBinding", b =>
+ {
+ b.HasOne("Net.Vatprc.Uniapi.Models.Notam", "Notam")
+ .WithMany("Bindings")
+ .HasForeignKey("NotamId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_notam_binding_notam_notam_id");
+
+ b.Navigation("Notam");
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.Session", b =>
+ {
+ b.HasOne("Net.Vatprc.Uniapi.Models.User", "User")
+ .WithMany("Sessions")
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_session_user_user_id");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.NotamBindingEvent", b =>
+ {
+ b.HasOne("Net.Vatprc.Uniapi.Models.Event", "Event")
+ .WithMany()
+ .HasForeignKey("EventId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_notam_binding_event_event_id");
+
+ b.Navigation("Event");
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.NotamBindingEventAirspace", b =>
+ {
+ b.HasOne("Net.Vatprc.Uniapi.Models.EventAirspace", "EventAirspace")
+ .WithMany()
+ .HasForeignKey("EventAirspaceId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_notam_binding_event_airspace_event_airspace_id");
+
+ b.Navigation("EventAirspace");
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.Event", b =>
+ {
+ b.Navigation("Airspaces");
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.EventAirspace", b =>
+ {
+ b.Navigation("Slots");
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.EventSlot", b =>
+ {
+ b.Navigation("Booking");
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.Notam", b =>
+ {
+ b.Navigation("Bindings");
+ });
+
+ modelBuilder.Entity("Net.Vatprc.Uniapi.Models.User", b =>
+ {
+ b.Navigation("Sessions");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Net.Vatprc.Uniapi/Migrations/20240915052017_EventSlotAddCallsignAndAircraftType.cs b/Net.Vatprc.Uniapi/Migrations/20240915052017_EventSlotAddCallsignAndAircraftType.cs
new file mode 100644
index 0000000..7bc28a7
--- /dev/null
+++ b/Net.Vatprc.Uniapi/Migrations/20240915052017_EventSlotAddCallsignAndAircraftType.cs
@@ -0,0 +1,38 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace Net.Vatprc.Uniapi.Migrations
+{
+ ///
+ public partial class EventSlotAddCallsignAndAircraftType : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AddColumn(
+ name: "aircraft_type_icao",
+ table: "event_slot",
+ type: "text",
+ nullable: true);
+
+ migrationBuilder.AddColumn(
+ name: "callsign",
+ table: "event_slot",
+ type: "text",
+ nullable: true);
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "aircraft_type_icao",
+ table: "event_slot");
+
+ migrationBuilder.DropColumn(
+ name: "callsign",
+ table: "event_slot");
+ }
+ }
+}
diff --git a/Net.Vatprc.Uniapi/Migrations/VATPRCContextModelSnapshot.cs b/Net.Vatprc.Uniapi/Migrations/VATPRCContextModelSnapshot.cs
index 5bbdff6..accaaee 100644
--- a/Net.Vatprc.Uniapi/Migrations/VATPRCContextModelSnapshot.cs
+++ b/Net.Vatprc.Uniapi/Migrations/VATPRCContextModelSnapshot.cs
@@ -167,6 +167,14 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasColumnType("uuid")
.HasColumnName("id");
+ b.Property("AircraftTypeIcao")
+ .HasColumnType("text")
+ .HasColumnName("aircraft_type_icao");
+
+ b.Property("Callsign")
+ .HasColumnType("text")
+ .HasColumnName("callsign");
+
b.Property("CreatedAt")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
diff --git a/Net.Vatprc.Uniapi/Models/EventSlot.cs b/Net.Vatprc.Uniapi/Models/EventSlot.cs
index c3103e0..94562ce 100644
--- a/Net.Vatprc.Uniapi/Models/EventSlot.cs
+++ b/Net.Vatprc.Uniapi/Models/EventSlot.cs
@@ -19,6 +19,9 @@ public class EventSlot
public EventBooking? Booking { get; set; }
+ public string? Callsign { get; set; }
+ public string? AircraftTypeIcao { get; set; }
+
public class EventSlotConfiguration : IEntityTypeConfiguration
{
public void Configure(EntityTypeBuilder builder)