user role + module alias
This commit is contained in:
@ -1,28 +1,35 @@
|
||||
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<User>;
|
||||
|
||||
export type UserInfoWithPassword = {
|
||||
password: string;
|
||||
} & UserInfo;
|
||||
|
||||
export type User = UserInfo & EntityInfo;
|
||||
|
||||
export type UserWithPassword = UserInfoWithPassword & EntityInfo;
|
||||
|
||||
export type UserWithPasswordCtor = Partial<UserWithPassword>;
|
||||
|
||||
export type CreateUserBody = {
|
||||
username: string;
|
||||
password: string;
|
||||
role: keyof typeof UserRoles;
|
||||
};
|
||||
|
||||
export type LoginUserBody = {
|
||||
username: string;
|
||||
password: string;
|
||||
};
|
||||
|
||||
export type UserCtor = Partial<User>;
|
||||
|
||||
export type UserWithPasswordCtor = Partial<UserWithPassword>;
|
||||
|
@ -8,6 +8,5 @@
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules/*", "dist/*"],
|
||||
"references": []
|
||||
"exclude": ["node_modules/*", "dist/*"]
|
||||
}
|
||||
|
Reference in New Issue
Block a user