add thrift server structure
fix models bug