generate ddl based on model