Files
boluo-app-main/src/types/group.ts
eleanor.mao fc37a612cc 新页面
2025-05-20 00:50:07 +08:00

57 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { GroupStatus, GroupType } from '@/constants/group';
import { IPaginationRequest, IPaginationResponse } from '@/types/common';
export interface GroupInfo {
// 播络群 id
blGroupId: string;
// 群标题
imGroupNick: string;
// 通告数量
allJobs: number;
// 今日通告数量
todayUpdates: number;
// 群头像
groupAvatar: string;
groupType: GroupType;
// 人数
groupMemberCount?: number;
}
export interface GroupDetail extends GroupInfo {
// 机器人 id
robotId: string;
}
export interface BatchPublishGroup {
cityCode: string;
count: number;
}
export interface SimpleGroupInfo extends Pick<GroupInfo, 'blGroupId' | 'imGroupNick'> {
groupId: string;
}
// 后台接口还没做分页,这里前端先提前做好
export interface GetGroupsRequest extends IPaginationRequest {
type: GroupType;
imGroupNick?: string;
// 0allGroups 返回所有的1allGroups 返回已经申请的
status?: GroupStatus;
}
export interface GetGroupsResponse extends IPaginationResponse {
myCreatedGroups: GroupInfo[];
myJoinedGroups: GroupInfo[];
allGroups: GroupInfo[];
myFollowedGroups: GroupInfo[];
}
export interface GetGroupDetailsRequest {
blGroupId: string;
}
export interface GroupItem {
title: string;
cityCode: number;
serviceUrl: string;
}