[IMP]mail,mail_message: make model_id field to function field and set base on model field.