เพิ่ม socket และ interface
This commit is contained in:
parent
a17625c13c
commit
830ad6d3f1
3 changed files with 274 additions and 6 deletions
|
|
@ -1,8 +1,63 @@
|
|||
interface DataOption {
|
||||
export interface Pagination<T> {
|
||||
result: T;
|
||||
page: number;
|
||||
pageSize: number;
|
||||
total: number;
|
||||
}
|
||||
export interface SupportIssueCategory {
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type {
|
||||
DataOption,
|
||||
export interface SupportIssue {
|
||||
id: string;
|
||||
createdByUserId: string;
|
||||
createdByUserName: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
title: string;
|
||||
status: string;
|
||||
unreadCount: number;
|
||||
lastMessage?: string;
|
||||
category: SupportIssueCategory;
|
||||
}
|
||||
|
||||
export interface SupportIssueWithMessage
|
||||
extends Omit<SupportIssue, "unreadCount" | "lastMessage"> {
|
||||
message: SupportIssueMessage[];
|
||||
}
|
||||
|
||||
export interface SupportIssueMessage {
|
||||
id: string;
|
||||
fromUserId: string;
|
||||
fromUserName: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
content: string;
|
||||
read: boolean;
|
||||
issueId: string;
|
||||
}
|
||||
|
||||
export interface SupportMessageStatus {
|
||||
fromUserId: string;
|
||||
fromUserName: string;
|
||||
lastAccessDate: string;
|
||||
issueId: string;
|
||||
}
|
||||
|
||||
export interface SupportMessageStatusResponse {
|
||||
result: SupportMessageStatus[];
|
||||
}
|
||||
|
||||
export interface SupportUserStatus {
|
||||
socketId: string;
|
||||
userId: string;
|
||||
name: string;
|
||||
role: string[];
|
||||
}
|
||||
|
||||
export type SupportIssueResponse = Pagination<SupportIssue[]>;
|
||||
export type SupportIssueCategoryResponse = {
|
||||
result: SupportIssueCategory[];
|
||||
};
|
||||
export type SupportMessageResponse = Pagination<SupportIssueWithMessage>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue