This commit is contained in:
Archer
2023-12-11 15:12:14 +08:00
committed by GitHub
parent 84cf6b5658
commit d2d7eac9e0
105 changed files with 1091 additions and 801 deletions

View File

@@ -3,10 +3,16 @@ const { Schema, model, models } = connectionMongo;
import { hashStr } from '@fastgpt/global/common/string/tools';
import { PRICE_SCALE } from '@fastgpt/global/support/wallet/bill/constants';
import type { UserModelSchema } from '@fastgpt/global/support/user/type';
import { UserStatusEnum, userStatusMap } from '@fastgpt/global/support/user/constant';
export const userCollectionName = 'users';
const UserSchema = new Schema({
status: {
type: String,
enum: Object.keys(userStatusMap),
default: UserStatusEnum.active
},
username: {
// 可以是手机/邮箱,新的验证都只用手机
type: String,