Hello, I have a user model. In this model, I want data for user information (such as age and about) How can I associate this data in my user model, I created a field for the profile as below
const user = new mongoose.Schema({
name: {
type: String,
required: true,
min: [2, "En az 3 karakter "],
},
email: {
type: String,
required: true,
match: [
/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/,
"Email biçiminde gir !",
],
},
password: {
type: String,
required: true,
min: [8, "En az 8 karakterli şifre gir "],
},
token: { type: String },
profile: { type: String },
content: { type: String, max: [200, "Max karakteri aştın !"] },