import { EntityInfo } from './entity'; export enum UserRoles { ADMIN = 'ADMIN', USER = 'USER', } export type UserInfo = { uuid: string; username: string; role: keyof typeof UserRoles; }; export type User = UserInfo & EntityInfo; export type UserCtor = Partial; export type UserInfoWithPassword = { password: string; } & UserInfo; export type UserWithPassword = UserInfoWithPassword & EntityInfo; export type UserWithPasswordCtor = Partial; export type CreateUserBody = { username: string; password: string; role: keyof typeof UserRoles; }; export type LoginUserBody = { username: string; password: string; };