feat:添加登录功能

This commit is contained in:
2025-11-10 13:58:06 +08:00
parent 49f9b28091
commit 2e2caeaab5
36 changed files with 1076 additions and 458 deletions

View File

@@ -8,7 +8,7 @@ const budgetSchema = new mongoose.Schema(
period: { type: String, enum: ['monthly', 'weekly'], default: 'monthly' },
threshold: { type: Number, min: 0, max: 1, default: 0.8 },
usage: { type: Number, min: 0, default: 0 },
userId: { type: mongoose.Schema.Types.ObjectId, ref: 'User', required: false }
userId: { type: mongoose.Schema.Types.ObjectId, ref: 'User', required: true }
},
{ timestamps: true }
);