Need an advice for group messaging model

hi, im trying to implement chat app using socketio with nodejs express mongoose,
i’ve created some demo models for group and private messages,
what im so confused about, and i need an advice for it,
i have a user model that stores groups, but not the groups chat,
my question is, since i already have a collection of groups that store users in group and their messages,
should i even have a group list in user model ?
in my app, the user can create / delete groups, so i wanted to keep a reference of user to the group…

here are my models:
user model:

const userSchema = new mongoose.Schema({
    firstName: { type: String, required: true },
    lastName: { type: String, required: true },
    userName: { type: String, required: true, unique: true },
    password: { type: String, required: true },
    friends: [{ type: mongoose.Schema.Types.ObjectId, ref: 'User', default: [] }],
    groups: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Group', default: [] }],
    blockedUsers: [{ type: mongoose.Schema.Types.ObjectId, ref: 'User', default: [] }] //user can block other users

group model:

const groupSchema = new mongoose.Schema({
    name: { type: String, required: true },
    admin: { type: mongoose.Schema.Types.ObjectId, ref: 'User', required: true },
    members: [{ type: mongoose.Schema.Types.ObjectId, ref: 'User', default: [] }],
    messages: [{
        sender: { type: mongoose.Schema.Types.ObjectId, ref: 'User', required: true },
        text: { type: String, required: true },
        timestamp: { type: Date, default: },

thanks for help, sorry about my english

Users can be in multiple groups, and groups can have a list of messages, and each msg has a user as the sender.

So groups having users in messages is different from users being in groups. For instance, you may have a page showing the list groups users are in.

that’s pretty much what i want,
then that’s mean my implementation was correct ?

at least for now, i don’t see any concern with the schema.

understood, thank you