feat: NTSex

This commit is contained in:
手瓜一十雪 2024-11-21 14:21:14 +08:00
parent 7ce95bca04
commit b8165242f0
3 changed files with 14 additions and 12 deletions

View File

@ -1,4 +1,4 @@
import { QQLevel, Sex } from './user'; import { QQLevel, NTSex } from './user';
export interface KickMemberInfo { export interface KickMemberInfo {
optFlag: number; optFlag: number;

View File

@ -1,8 +1,9 @@
// 性别枚举 // 性别枚举
export enum Sex { export enum NTSex {
male = 1, GENDER_UNKOWN = 0,
female = 2, GENDER_MALE = 1,
unknown = 255, GENDER_FEMALE = 2,
GENDER_PRIVACY = 255,
} }
// 好友分类类型 // 好友分类类型
@ -226,7 +227,7 @@ export interface UserDetailInfoListenerArg {
export interface ModifyProfileParams { export interface ModifyProfileParams {
nick: string; nick: string;
longNick: string; longNick: string;
sex: Sex; sex: NTSex;
birthday: { birthday_year: string, birthday_month: string, birthday_day: string }; birthday: { birthday_year: string, birthday_month: string, birthday_day: string };
location: any; location: any;
} }
@ -259,7 +260,7 @@ export interface User {
avatarUrl?: string; avatarUrl?: string;
longNick?: string; longNick?: string;
remark?: string; remark?: string;
sex?: Sex; sex?: NTSex;
age?: number; age?: number;
qqLevel?: QQLevel; qqLevel?: QQLevel;
qid?: string; qid?: string;

View File

@ -1,5 +1,5 @@
import { calcQQLevel, FileNapCatOneBotUUID } from '@/common/helper'; import { calcQQLevel, FileNapCatOneBotUUID } from '@/common/helper';
import { FriendV2, Group, GroupFileInfoUpdateParamType, GroupMember, SelfInfo, Sex } from '@/core'; import { FriendV2, Group, GroupFileInfoUpdateParamType, GroupMember, SelfInfo, NTSex } from '@/core';
import { import {
OB11Group, OB11Group,
OB11GroupFile, OB11GroupFile,
@ -37,12 +37,13 @@ export class OB11Construct {
}[role]; }[role];
} }
static sex(sex?: Sex): OB11UserSex { static sex(sex?: NTSex): OB11UserSex {
if (!sex) return OB11UserSex.unknown; if (!sex) return OB11UserSex.unknown;
return { return {
[Sex.male]: OB11UserSex.male, [NTSex.GENDER_MALE]: OB11UserSex.male,
[Sex.female]: OB11UserSex.female, [NTSex.GENDER_FEMALE]: OB11UserSex.female,
[Sex.unknown]: OB11UserSex.unknown, [NTSex.GENDER_UNKOWN]: OB11UserSex.unknown,
[NTSex.GENDER_PRIVACY]: OB11UserSex.unknown,
}[sex] || OB11UserSex.unknown; }[sex] || OB11UserSex.unknown;
} }