build schema, model, action in resource()