(NodeJS) Is there a way in a model to create an object or set it at false is nothing in true in mongoose

Hope you’re good.
I don’t know how to describe my problem, so I’ll try to be as clear and concise as possible.
If despite this the problem is not clear, do not hesitate to tell me so that I can reformulate it.

I have to try to create a model that differs depending on whether something is true or false, I explain :

compliance: {
    transactionsPending: {
      deletePending: boolean;
    };
  }; // OK 

Let’s say I have this in my model, I want to be able to make sure that if everything is false in this model, I have the following model:

compliance: false // OK 

Best regards,