diff --git a/packages/global/support/user/type.d.ts b/packages/global/support/user/type.d.ts index 3a3d56ea0d65..c16825b11bb5 100644 --- a/packages/global/support/user/type.d.ts +++ b/packages/global/support/user/type.d.ts @@ -4,9 +4,11 @@ import { TeamItemType } from './team/type'; export type UserModelSchema = { _id: string; username: string; + email?: string; + phonePrefix?: number; + phone?: string; password: string; avatar: string; - balance: number; promotionRate: number; inviterId?: string; openaiKey: string; @@ -24,7 +26,6 @@ export type UserType = { _id: string; username: string; avatar: string; - balance: number; timezone: string; promotionRate: UserModelSchema['promotionRate']; openaiAccount: UserModelSchema['openaiAccount']; diff --git a/packages/service/support/user/schema.ts b/packages/service/support/user/schema.ts index 496726860d30..39935971a787 100644 --- a/packages/service/support/user/schema.ts +++ b/packages/service/support/user/schema.ts @@ -1,7 +1,6 @@ import { connectionMongo, type Model } from '../../common/mongo'; const { Schema, model, models } = connectionMongo; import { hashStr } from '@fastgpt/global/common/string/tools'; -import { PRICE_SCALE } from '@fastgpt/global/support/wallet/constants'; import type { UserModelSchema } from '@fastgpt/global/support/user/type'; import { UserStatusEnum, userStatusMap } from '@fastgpt/global/support/user/constant'; @@ -19,6 +18,15 @@ const UserSchema = new Schema({ required: true, unique: true // 唯一 }, + email: { + type: String + }, + phonePrefix: { + type: Number + }, + phone: { + type: String + }, password: { type: String, required: true, @@ -34,10 +42,6 @@ const UserSchema = new Schema({ type: String, default: '/icon/human.svg' }, - balance: { - type: Number, - default: 2 * PRICE_SCALE - }, inviterId: { // 谁邀请注册的 type: Schema.Types.ObjectId,