create sql by model object