${httpComment} ${apiComment.create}
POST {{baseUrl}}/${package.ModuleName}/${typeHyphen}/create
Content-Type: application/json
Authorization: {{token}}

{
#foreach($field in ${table.fields})
#if("$!field.propertyName" != "id")
  "${field.propertyName}": ""#if($foreach.hasNext),#end
#end
#end
}


${httpComment} ${apiComment.updateById}
PUT {{baseUrl}}/${package.ModuleName}/${typeHyphen}/update
Content-Type: application/json
Authorization: {{token}}

{
#foreach($field in ${table.fields})
  "${field.propertyName}": ""#if($foreach.hasNext),#end
#end
}


${httpComment} ${apiComment.getById}
GET {{baseUrl}}/${package.ModuleName}/${typeHyphen}/get?id=1
Authorization: {{token}}


${httpComment} ${apiComment.getByIdList}
GET {{baseUrl}}/${package.ModuleName}/${typeHyphen}/batch-get?idList=1,2,3
Authorization: {{token}}


${httpComment} ${apiComment.queryList}
POST {{baseUrl}}/${package.ModuleName}/${typeHyphen}/list
Content-Type: application/json
Authorization: {{token}}

{
  #foreach($field in ${table.fields})
  "${field.propertyName}": ""#if($foreach.hasNext),#end
  #end
}


${httpComment} ${apiComment.queryPage}
POST {{baseUrl}}/${package.ModuleName}/${typeHyphen}/query
Content-Type: application/json
Authorization: {{token}}

{
  "page": 1,
  "limit": 10,
  #foreach($field in ${table.fields})
  "${field.propertyName}": ""#if($foreach.hasNext),#end
  #end
}


${httpComment} ${apiComment.queryCount}
POST {{baseUrl}}/${package.ModuleName}/${typeHyphen}/count
Content-Type: application/json
Authorization: {{token}}

{
  #foreach($field in ${table.fields})
  "${field.propertyName}": ""#if($foreach.hasNext),#end
  #end
}


${httpComment} ${apiComment.deleteById}
DELETE {{baseUrl}}/${package.ModuleName}/${typeHyphen}/delete?id=1
Authorization: {{token}}


${httpComment} ${apiComment.batchDelete}
DELETE {{baseUrl}}/${package.ModuleName}/${typeHyphen}/batch-delete?idList=1,2,3
Authorization: {{token}}

${httpComment}
