ApfelNetzwerk/web/src/types.ts

52 lines
850 B
TypeScript
Raw Normal View History

2024-10-08 11:44:24 +02:00
export interface LicenseGroup {
id: string;
name: string;
licenses: License[];
}
export interface License {
name: string;
id: string;
start?: string;
end?: string;
key: string;
amount?: number;
note?: string;
group_id: string;
}
export interface CreateLicenseDto {
name: string;
start: Date | null;
end: Date | null;
key: string;
amount?: number;
group_id: string;
note?: string;
}
export interface User {
id: string;
name: string;
email: string;
admin: boolean;
}
export interface CreateUserDto {
name: string;
email: string;
password: string;
admin: boolean;
}
export interface UpdateUserDto {
name: string;
email: string;
password?: string;
admin?: boolean;
}
export type CreateGroupDto = Omit<LicenseGroup, "id" | "licenses">;
export type UpdateLicenseDto = Omit<License, "id">;