implemented connectedDispatch record for dispatcher
This commit is contained in:
@@ -1,19 +1,15 @@
|
||||
import { prisma } from "@repo/db";
|
||||
import { Router } from "express";
|
||||
import { pubClient } from "modules/redis";
|
||||
|
||||
const router = Router();
|
||||
|
||||
router.get("/", async (req, res) => {
|
||||
const keys = await pubClient.keys("Dispatcher:*");
|
||||
const user = await Promise.all(
|
||||
keys.map(async (key) => {
|
||||
const data = await pubClient.json.get(key);
|
||||
return {
|
||||
...(typeof data === "object" && data !== null ? data : {}),
|
||||
userId: key.split(":")[1],
|
||||
};
|
||||
}),
|
||||
);
|
||||
const user = await prisma.connectedDispatcher.findMany({
|
||||
where: {
|
||||
logoutTime: null,
|
||||
},
|
||||
});
|
||||
|
||||
res.json(user);
|
||||
});
|
||||
|
||||
@@ -2,11 +2,13 @@ import { Router } from "express";
|
||||
import livekitRouter from "./livekit";
|
||||
import dispatcherRotuer from "./dispatcher";
|
||||
import missionRouter from "./mission";
|
||||
import statusRouter from "./status";
|
||||
|
||||
const router = Router();
|
||||
|
||||
router.use("/livekit", livekitRouter);
|
||||
router.use("/dispatcher", dispatcherRotuer);
|
||||
router.use("/mission", missionRouter);
|
||||
router.use("/status", statusRouter);
|
||||
|
||||
export default router;
|
||||
|
||||
22
apps/dispatch-server/routes/status.ts
Normal file
22
apps/dispatch-server/routes/status.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { prisma } from "@repo/db";
|
||||
import { Router } from "express";
|
||||
|
||||
const router = Router();
|
||||
|
||||
router.get("/connected-users", async (req, res) => {
|
||||
const connectedDispatcher = await prisma.connectedDispatcher.findMany({
|
||||
where: {
|
||||
logoutTime: null,
|
||||
},
|
||||
});
|
||||
|
||||
const connectedAircraft = await prisma.connectedAircraft.findMany({
|
||||
where: {
|
||||
logoutTime: null,
|
||||
},
|
||||
});
|
||||
|
||||
res.json([...connectedDispatcher, ...connectedAircraft]);
|
||||
});
|
||||
|
||||
export default router;
|
||||
@@ -1,4 +1,4 @@
|
||||
import { prisma } from "@repo/db";
|
||||
import { getPublicUser, prisma } from "@repo/db";
|
||||
import { pubClient } from "modules/redis";
|
||||
import { Server, Socket } from "socket.io";
|
||||
|
||||
@@ -11,6 +11,7 @@ export const handleConnectDispatch =
|
||||
logoffTime: string;
|
||||
selectedZone: string;
|
||||
}) => {
|
||||
try {
|
||||
const userId = socket.data.user.id; // User ID aus dem JWT-Token
|
||||
console.log("User connected to dispatch server");
|
||||
const user = await prisma.user.findUnique({
|
||||
@@ -18,11 +19,35 @@ export const handleConnectDispatch =
|
||||
id: userId,
|
||||
},
|
||||
});
|
||||
|
||||
if (!user) return Error("User not found");
|
||||
|
||||
let parsedLogoffDate = null;
|
||||
if (logoffTime.length > 0) {
|
||||
const now = new Date();
|
||||
const [hours, minutes] = logoffTime.split(":").map(Number);
|
||||
if (!hours || !minutes) {
|
||||
throw new Error("Invalid logoffTime format");
|
||||
}
|
||||
parsedLogoffDate = new Date(now);
|
||||
parsedLogoffDate.setHours(hours, minutes, 0, 0);
|
||||
|
||||
// If the calculated time is earlier than now, add one day to make it tomorrow
|
||||
if (parsedLogoffDate <= now) {
|
||||
parsedLogoffDate.setDate(parsedLogoffDate.getDate() + 1);
|
||||
}
|
||||
|
||||
// If the calculated time is in the past, add one day to make it in the future
|
||||
if (parsedLogoffDate <= now) {
|
||||
parsedLogoffDate.setDate(parsedLogoffDate.getDate() + 1);
|
||||
}
|
||||
}
|
||||
|
||||
const connectedDispatcherEntry = await prisma.connectedDispatcher.create({
|
||||
data: {
|
||||
publicUser: {},
|
||||
esimatedLogoutTime: logoffTime,
|
||||
lastHeartbeat: new Date(),
|
||||
publicUser: getPublicUser(user) as any,
|
||||
esimatedLogoutTime: parsedLogoffDate?.toISOString() || null,
|
||||
lastHeartbeat: new Date().toISOString(),
|
||||
userId: userId,
|
||||
loginTime: new Date().toISOString(),
|
||||
},
|
||||
@@ -54,4 +79,8 @@ export const handleConnectDispatch =
|
||||
socket.on("reconnect", async () => {
|
||||
console.log("Reconnected to dispatch server");
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("Error connecting to dispatch server:", error);
|
||||
console.log("Error connecting to dispatch server:", error);
|
||||
}
|
||||
};
|
||||
|
||||
94
apps/dispatch-server/socket-events/connect-pilot.ts
Normal file
94
apps/dispatch-server/socket-events/connect-pilot.ts
Normal file
@@ -0,0 +1,94 @@
|
||||
import { getPublicUser, prisma } from "@repo/db";
|
||||
import { Server, Socket } from "socket.io";
|
||||
|
||||
export const handleConnectDispatch =
|
||||
(socket: Socket, io: Server) =>
|
||||
async ({
|
||||
logoffTime,
|
||||
stationId,
|
||||
}: {
|
||||
logoffTime: string;
|
||||
stationId: number;
|
||||
}) => {
|
||||
try {
|
||||
const userId = socket.data.user.id; // User ID aus dem JWT-Token
|
||||
console.log("User connected to dispatch server");
|
||||
const user = await prisma.user.findUnique({
|
||||
where: {
|
||||
id: userId,
|
||||
},
|
||||
});
|
||||
|
||||
if (!user) return Error("User not found");
|
||||
|
||||
let parsedLogoffDate = null;
|
||||
if (logoffTime.length > 0) {
|
||||
const now = new Date();
|
||||
const [hours, minutes] = logoffTime.split(":").map(Number);
|
||||
if (!hours || !minutes) {
|
||||
throw new Error("Invalid logoffTime format");
|
||||
}
|
||||
parsedLogoffDate = new Date(now);
|
||||
parsedLogoffDate.setHours(hours, minutes, 0, 0);
|
||||
|
||||
// If the calculated time is earlier than now, add one day to make it tomorrow
|
||||
if (parsedLogoffDate <= now) {
|
||||
parsedLogoffDate.setDate(parsedLogoffDate.getDate() + 1);
|
||||
}
|
||||
}
|
||||
|
||||
const connectedAircraftEntry = await prisma.connectedAircraft.create({
|
||||
data: {
|
||||
publicUser: getPublicUser(user) as any,
|
||||
esimatedLogoutTime: parsedLogoffDate?.toISOString() || null,
|
||||
lastHeartbeat: new Date().toISOString(),
|
||||
userId: userId,
|
||||
loginTime: new Date().toISOString(),
|
||||
stationId: stationId,
|
||||
/* user: { connect: { id: userId } }, // Ensure the user relationship is set
|
||||
station: { connect: { id: stationId } }, // Ensure the station relationship is set */
|
||||
},
|
||||
});
|
||||
|
||||
socket.join("dispatchers"); // Join the dispatchers room
|
||||
socket.join(`user:${userId}`); // Join the user-specific room
|
||||
socket.join(`station:${stationId}`); // Join the station-specific room
|
||||
|
||||
io.to("dispatchers").emit("dispatcher-update");
|
||||
io.to("pilots").emit("dispatcher-update");
|
||||
|
||||
// Add a listener for station-specific events
|
||||
socket.on(`station:${stationId}:event`, async (data) => {
|
||||
console.log(`Received event for station ${stationId}:`, data);
|
||||
// Handle station-specific logic here
|
||||
io.to(`station:${stationId}`).emit("station-event-update", data);
|
||||
});
|
||||
|
||||
socket.on("disconnect", async () => {
|
||||
console.log("Disconnected from dispatch server");
|
||||
await prisma.connectedDispatcher.update({
|
||||
where: {
|
||||
id: connectedAircraftEntry.id,
|
||||
},
|
||||
data: {
|
||||
logoutTime: new Date().toISOString(),
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
socket.on("reconnect", async () => {
|
||||
console.log("Reconnected to dispatch server");
|
||||
await prisma.connectedDispatcher.update({
|
||||
where: {
|
||||
id: connectedAircraftEntry.id,
|
||||
},
|
||||
data: {
|
||||
lastHeartbeat: new Date().toISOString(),
|
||||
logoutTime: null,
|
||||
},
|
||||
});
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("Error connecting to dispatch server:", error);
|
||||
}
|
||||
};
|
||||
@@ -3,9 +3,9 @@ import { ChatBubbleIcon, PaperPlaneIcon } from "@radix-ui/react-icons";
|
||||
import { useLeftMenuStore } from "_store/leftMenuStore";
|
||||
import { useSession } from "next-auth/react";
|
||||
import { Fragment, useEffect, useRef, useState } from "react";
|
||||
import { Dispatcher } from "dispatch/_components/navbar/_components/action";
|
||||
import { cn } from "helpers/cn";
|
||||
import { getDispatcher } from "pilot/_components/navbar/action";
|
||||
import { getConenctedUsers } from "helpers/axios";
|
||||
import { asPublicUser, ConnectedAircraft, ConnectedDispatcher } from "@repo/db";
|
||||
|
||||
export const Chat = () => {
|
||||
const {
|
||||
@@ -24,7 +24,9 @@ export const Chat = () => {
|
||||
const session = useSession();
|
||||
const [addTabValue, setAddTabValue] = useState<string>("");
|
||||
const [message, setMessage] = useState<string>("");
|
||||
const [dispatcher, setDispatcher] = useState<Dispatcher[] | null>(null);
|
||||
const [connectedUser, setConnectedUser] = useState<
|
||||
(ConnectedAircraft | ConnectedDispatcher)[] | null
|
||||
>(null);
|
||||
const timeout = useRef<NodeJS.Timeout | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -33,24 +35,26 @@ export const Chat = () => {
|
||||
}, [session, setOwnId]);
|
||||
|
||||
useEffect(() => {
|
||||
const fetchDispatcher = async () => {
|
||||
const data = await getDispatcher();
|
||||
const fetchConnectedUser = async () => {
|
||||
const data = await getConenctedUsers();
|
||||
if (data) {
|
||||
const filteredDispatcher = data.filter((user) => {
|
||||
return (
|
||||
const filteredConnectedUser = data.filter((user) => {
|
||||
/* return (
|
||||
user.userId !== session.data?.user.id &&
|
||||
!Object.keys(chats).includes(user.userId)
|
||||
);
|
||||
); */
|
||||
|
||||
return true;
|
||||
});
|
||||
setDispatcher(filteredDispatcher);
|
||||
setConnectedUser(filteredConnectedUser);
|
||||
}
|
||||
if (!addTabValue && data[0]) setAddTabValue(data[0].userId);
|
||||
};
|
||||
|
||||
timeout.current = setInterval(() => {
|
||||
fetchDispatcher();
|
||||
fetchConnectedUser();
|
||||
}, 1000);
|
||||
fetchDispatcher();
|
||||
fetchConnectedUser();
|
||||
|
||||
return () => {
|
||||
if (timeout.current) {
|
||||
@@ -61,6 +65,8 @@ export const Chat = () => {
|
||||
};
|
||||
}, [addTabValue, chats, session.data?.user.id]);
|
||||
|
||||
console.log("connectedUser", connectedUser);
|
||||
|
||||
return (
|
||||
<div className={cn("dropdown dropdown-right", chatOpen && "dropdown-open")}>
|
||||
<div className="indicator">
|
||||
@@ -95,23 +101,23 @@ export const Chat = () => {
|
||||
value={addTabValue}
|
||||
onChange={(e) => setAddTabValue(e.target.value)}
|
||||
>
|
||||
{!dispatcher?.length && (
|
||||
{!connectedUser?.length && (
|
||||
<option disabled={true}>Keine Chatpartner gefunden</option>
|
||||
)}
|
||||
{dispatcher?.map((user) => (
|
||||
{connectedUser?.map((user) => (
|
||||
<option key={user.userId} value={user.userId}>
|
||||
{user.name}
|
||||
{asPublicUser(user.publicUser).fullName}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<button
|
||||
className="btn btn-sm btn-soft btn-primary join-item"
|
||||
onClick={() => {
|
||||
const user = dispatcher?.find(
|
||||
const user = connectedUser?.find(
|
||||
(user) => user.userId === addTabValue,
|
||||
);
|
||||
if (!user) return;
|
||||
addChat(addTabValue, user.name);
|
||||
addChat(addTabValue, asPublicUser(user.publicUser).fullName);
|
||||
setSelectedChat(addTabValue);
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
import { ExclamationTriangleIcon, PaperPlaneIcon } from "@radix-ui/react-icons";
|
||||
import { useSession } from "next-auth/react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { Dispatcher } from "dispatch/_components/navbar/_components/action";
|
||||
import { cn } from "helpers/cn";
|
||||
import { serverApi } from "helpers/axios";
|
||||
import { getDispatcher } from "pilot/_components/navbar/action";
|
||||
import { getConenctedUsers, serverApi } from "helpers/axios";
|
||||
import { useLeftMenuStore } from "_store/leftMenuStore";
|
||||
import { asPublicUser, ConnectedAircraft, ConnectedDispatcher } from "@repo/db";
|
||||
|
||||
export const Report = () => {
|
||||
const { setChatOpen, setReportTabOpen, reportTabOpen, setOwnId } =
|
||||
@@ -15,7 +14,9 @@ export const Report = () => {
|
||||
const session = useSession();
|
||||
const [selectedPlayer, setSelectedPlayer] = useState<string>("");
|
||||
const [message, setMessage] = useState<string>("");
|
||||
const [dispatcher, setDispatcher] = useState<Dispatcher[] | null>(null);
|
||||
const [connectedUser, setConnectedUser] = useState<
|
||||
(ConnectedAircraft | ConnectedDispatcher)[] | null
|
||||
>(null);
|
||||
const timeout = useRef<NodeJS.Timeout | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -24,21 +25,21 @@ export const Report = () => {
|
||||
}, [session, setOwnId]);
|
||||
|
||||
useEffect(() => {
|
||||
const fetchDispatcher = async () => {
|
||||
const data = await getDispatcher();
|
||||
const fetchConnectedUser = async () => {
|
||||
const data = await getConenctedUsers();
|
||||
if (data) {
|
||||
const filteredDispatcher = data.filter(
|
||||
const filteredConnectedUser = data.filter(
|
||||
(user) => user.userId !== session.data?.user.id,
|
||||
);
|
||||
setDispatcher(filteredDispatcher);
|
||||
setConnectedUser(filteredConnectedUser);
|
||||
}
|
||||
if (!selectedPlayer && data[0]) setSelectedPlayer(data[0].userId);
|
||||
};
|
||||
|
||||
timeout.current = setInterval(() => {
|
||||
fetchDispatcher();
|
||||
}, 1000000);
|
||||
fetchDispatcher();
|
||||
fetchConnectedUser();
|
||||
}, 1000);
|
||||
fetchConnectedUser();
|
||||
|
||||
return () => {
|
||||
if (timeout.current) {
|
||||
@@ -81,12 +82,12 @@ export const Report = () => {
|
||||
value={selectedPlayer}
|
||||
onChange={(e) => setSelectedPlayer(e.target.value)}
|
||||
>
|
||||
{!dispatcher?.length && (
|
||||
{!connectedUser?.length && (
|
||||
<option disabled={true}>Keine Spieler gefunden</option>
|
||||
)}
|
||||
{dispatcher?.map((user) => (
|
||||
{connectedUser?.map((user) => (
|
||||
<option key={user.userId} value={user.userId}>
|
||||
{user.name}
|
||||
{asPublicUser(user).fullName}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { ConnectedAircraft, ConnectedDispatcher } from "@repo/db";
|
||||
import axios from "axios";
|
||||
|
||||
export const serverApi = axios.create({
|
||||
@@ -7,3 +8,15 @@ export const serverApi = axios.create({
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
|
||||
export const getConenctedUsers = async (): Promise<
|
||||
(ConnectedDispatcher | ConnectedAircraft)[]
|
||||
> => {
|
||||
const res = await serverApi.get<(ConnectedDispatcher | ConnectedAircraft)[]>(
|
||||
"/status/connected-users",
|
||||
);
|
||||
if (res.status !== 200) {
|
||||
throw new Error("Failed to fetch connected users");
|
||||
}
|
||||
return res.data;
|
||||
};
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
"use client";
|
||||
import { ChatBubbleIcon, PaperPlaneIcon } from "@radix-ui/react-icons";
|
||||
import { leftMenuStore } from "_store/leftMenuStore";
|
||||
import { useLeftMenuStore } from "_store/leftMenuStore";
|
||||
import { useSession } from "next-auth/react";
|
||||
import { Fragment, useEffect, useRef, useState } from "react";
|
||||
import {
|
||||
Dispatcher,
|
||||
getDispatcher,
|
||||
} from "dispatch/_components/navbar/_components/action";
|
||||
import { cn } from "helpers/cn";
|
||||
import { getConenctedUsers } from "helpers/axios";
|
||||
import {
|
||||
asPublicUser,
|
||||
ConnectedAircraft,
|
||||
ConnectedDispatcher,
|
||||
PublicUser,
|
||||
} from "@repo/db";
|
||||
|
||||
export const Chat = () => {
|
||||
const {
|
||||
@@ -20,38 +23,40 @@ export const Chat = () => {
|
||||
selectedChat,
|
||||
setSelectedChat,
|
||||
setChatNotification,
|
||||
} = leftMenuStore();
|
||||
} = useLeftMenuStore();
|
||||
const [sending, setSending] = useState(false);
|
||||
const session = useSession();
|
||||
const [addTabValue, setAddTabValue] = useState<string>("");
|
||||
const [message, setMessage] = useState<string>("");
|
||||
const [dispatcher, setDispatcher] = useState<Dispatcher[] | null>(null);
|
||||
const [connectedUser, setConnectedUser] = useState<
|
||||
(ConnectedAircraft | ConnectedDispatcher)[] | null
|
||||
>(null);
|
||||
const timeout = useRef<NodeJS.Timeout | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (!session.data?.user.id) return;
|
||||
setOwnId(session.data.user.id);
|
||||
}, [session]);
|
||||
}, [session, setOwnId]);
|
||||
|
||||
useEffect(() => {
|
||||
const fetchDispatcher = async () => {
|
||||
const data = await getDispatcher();
|
||||
const fetchConnectedUser = async () => {
|
||||
const data = await getConenctedUsers();
|
||||
if (data) {
|
||||
const filteredDispatcher = data.filter((user) => {
|
||||
const filteredConnectedUser = data.filter((user) => {
|
||||
return (
|
||||
user.userId !== session.data?.user.id &&
|
||||
!Object.keys(chats).includes(user.userId)
|
||||
);
|
||||
});
|
||||
setDispatcher(filteredDispatcher);
|
||||
setConnectedUser(filteredConnectedUser);
|
||||
}
|
||||
if (!addTabValue && data[0]) setAddTabValue(data[0].userId);
|
||||
};
|
||||
|
||||
timeout.current = setInterval(() => {
|
||||
fetchDispatcher();
|
||||
fetchConnectedUser();
|
||||
}, 1000000);
|
||||
fetchDispatcher();
|
||||
fetchConnectedUser();
|
||||
|
||||
return () => {
|
||||
if (timeout.current) {
|
||||
@@ -60,7 +65,7 @@ export const Chat = () => {
|
||||
console.log("cleared");
|
||||
}
|
||||
};
|
||||
}, [addTabValue, chats]);
|
||||
}, [addTabValue, chats, session]);
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -95,23 +100,24 @@ export const Chat = () => {
|
||||
value={addTabValue}
|
||||
onChange={(e) => setAddTabValue(e.target.value)}
|
||||
>
|
||||
{!dispatcher?.length && (
|
||||
{!connectedUser?.length && (
|
||||
<option disabled={true}>Keine Chatpartner gefunden</option>
|
||||
)}
|
||||
{dispatcher?.map((user) => (
|
||||
{connectedUser?.map((user) => (
|
||||
<option key={user.userId} value={user.userId}>
|
||||
{user.name}
|
||||
{(user.publicUser as unknown as PublicUser).firstname}{" "}
|
||||
{(user.publicUser as unknown as PublicUser).lastname}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<button
|
||||
className="btn btn-sm btn-soft btn-primary join-item"
|
||||
onClick={() => {
|
||||
const user = dispatcher?.find(
|
||||
const user = connectedUser?.find(
|
||||
(user) => user.userId === addTabValue,
|
||||
);
|
||||
if (!user) return;
|
||||
addChat(addTabValue, user.name);
|
||||
addChat(addTabValue, asPublicUser(user.publicUser).fullName);
|
||||
setSelectedChat(addTabValue);
|
||||
}}
|
||||
>
|
||||
@@ -203,7 +209,7 @@ export const Chat = () => {
|
||||
}}
|
||||
disabled={sending}
|
||||
role="button"
|
||||
onSubmit={(e) => false}
|
||||
onSubmit={() => false}
|
||||
>
|
||||
{sending ? (
|
||||
<span className="loading loading-spinner loading-sm"></span>
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
"use server";
|
||||
|
||||
export interface Dispatcher {
|
||||
userId: string;
|
||||
lastSeen: string;
|
||||
@@ -9,10 +7,3 @@ export interface Dispatcher {
|
||||
name: string;
|
||||
socketId: string;
|
||||
}
|
||||
|
||||
export const getDispatcher = async () => {
|
||||
const res = await fetch(`
|
||||
${process.env.NEXT_PUBLIC_DISPATCH_SERVER_URL}/dispatcher`);
|
||||
const data = await res.json();
|
||||
return data as Dispatcher[];
|
||||
};
|
||||
|
||||
Binary file not shown.
@@ -5,6 +5,7 @@ export interface PublicUser {
|
||||
lastname: string;
|
||||
publicId: string;
|
||||
badges: string[];
|
||||
fullName: string;
|
||||
}
|
||||
|
||||
export const getPublicUser = (user: User): PublicUser => {
|
||||
@@ -14,7 +15,18 @@ export const getPublicUser = (user: User): PublicUser => {
|
||||
.split(" ")
|
||||
.map((part) => `${part[0]}.`)
|
||||
.join(" "), // Only take the first part of the name
|
||||
fullName: `${user.firstname} ${user.lastname
|
||||
.split(" ")
|
||||
.map((part) => `${part[0]}.`)
|
||||
.join(" ")}`,
|
||||
publicId: user.publicId,
|
||||
badges: user.badges,
|
||||
};
|
||||
};
|
||||
|
||||
export const asPublicUser = (publicUSerJson: unknown): PublicUser => {
|
||||
if (typeof publicUSerJson !== "object" || publicUSerJson === null) {
|
||||
throw new Error("Invalid JSON format for PublicUser");
|
||||
}
|
||||
return publicUSerJson as PublicUser;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
model connectedAircraft {
|
||||
model ConnectedAircraft {
|
||||
id Int @id @default(autoincrement())
|
||||
userId String
|
||||
publicUser Json
|
||||
|
||||
@@ -35,5 +35,5 @@ model Station {
|
||||
|
||||
MissionsOnStations MissionsOnStations[]
|
||||
MissionOnStationUsers MissionOnStationUsers[]
|
||||
connectedAircraft connectedAircraft[]
|
||||
ConnectedAircraft ConnectedAircraft[]
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ model User {
|
||||
Mission Mission[]
|
||||
MissionOnStationUsers MissionOnStationUsers[]
|
||||
ConnectedDispatcher ConnectedDispatcher[]
|
||||
connectedAircraft connectedAircraft[]
|
||||
ConnectedAircraft ConnectedAircraft[]
|
||||
PositionLog PositionLog[]
|
||||
|
||||
@@map(name: "users")
|
||||
|
||||
Reference in New Issue
Block a user