get fieldnames and types by model