38 lines
803 B
TypeScript
38 lines
803 B
TypeScript
![]() |
import { Staff, Department } from "@prisma/client";
|
||
|
import { RolePerms } from "../enum";
|
||
|
|
||
|
export type StaffRowModel = {
|
||
|
avatar: string;
|
||
|
dept_name: string;
|
||
|
officer_id: string;
|
||
|
phone_number: string;
|
||
|
showname: string;
|
||
|
username: string;
|
||
|
};
|
||
|
export type UserProfile = Staff & {
|
||
|
permissions: RolePerms[];
|
||
|
deptIds: string[];
|
||
|
parentDeptIds: string[];
|
||
|
domain: Department;
|
||
|
department: Department;
|
||
|
};
|
||
|
|
||
|
export type StaffDto = Staff & {
|
||
|
domain?: Department;
|
||
|
department?: Department;
|
||
|
};
|
||
|
export interface AuthDto {
|
||
|
token: string;
|
||
|
staff: StaffDto;
|
||
|
refreshToken: string;
|
||
|
perms: string[];
|
||
|
}
|
||
|
export interface JwtPayload {
|
||
|
sub: string;
|
||
|
username: string;
|
||
|
}
|
||
|
export interface TokenPayload {
|
||
|
id: string;
|
||
|
phoneNumber: string;
|
||
|
name: string;
|
||
|
}
|