misc_pterodactyl-panel/resources/scripts/api/definitions/admin/models.d.ts
2022-12-15 19:06:14 -07:00

29 lines
742 B
TypeScript

import { ModelWithRelationships, UUID } from '@/api/definitions';
import { Server } from '@/api/admin/server';
interface User extends ModelWithRelationships {
id: number;
uuid: UUID;
externalId: string;
username: string;
email: string;
language: string;
adminRoleId: number | null;
roleName: string;
isRootAdmin: boolean;
isUsingTwoFactor: boolean;
avatarUrl: string;
createdAt: Date;
updatedAt: Date;
relationships: {
role: UserRole | null;
// TODO: just use an API call, this is probably a bad idea for performance.
servers?: Server[];
};
}
interface UserRole extends ModelWithRelationships {
id: number;
name: string;
description: string;
}