contact_field_template.api 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import "../base.api"
  2. type (
  3. ContactFieldTemplateOptions {
  4. Label *string `json:"label,optional"`
  5. Value *string `json:"value,optional"`
  6. }
  7. ContactFieldTemplate {
  8. Type *string `json:"type,optional"`
  9. Id *string `json:"id,optional"`
  10. Label *string `json:"label,optional"`
  11. Options []ContactFieldTemplateOptions `json:"options,optional"`
  12. Value []string `json:"value,optional"`
  13. }
  14. ContactFieldTemplateInfo {
  15. BaseIDInfo
  16. // Status 1: normal 2: ban | 状态 1 正常 2 禁用
  17. Status *uint8 `json:"status,optional"`
  18. // 组织ID
  19. OrganizationId *uint64 `json:"organizationId,optional"`
  20. Template []ContactFieldTemplate `json:"template,optional"`
  21. }
  22. // Contact information response | Contact信息返回体
  23. ContactFieldTemplateInfoResp {
  24. BaseDataInfo
  25. // Contact information | Contact数据
  26. Data []ContactFieldTemplate `json:"data"`
  27. }
  28. )
  29. @server(
  30. jwt: Auth
  31. group: contact_field_template
  32. middleware: Authority
  33. )
  34. service Wechat {
  35. // Create contact_field_template information | 创建 ContactFieldTemplate
  36. @handler createContactFieldTemplate
  37. post /contact_field_template/create (ContactFieldTemplateInfo) returns (BaseMsgResp)
  38. // Update contact_field_template information | 更新 ContactFieldTemplate
  39. @handler updateContactFieldTemplate
  40. post /contact_field_template/update (ContactFieldTemplateInfo) returns (BaseMsgResp)
  41. // Delete contact_field_template information | 删除 ContactFieldTemplate 信息
  42. @handler deleteContactFieldTemplate
  43. post /contact_field_template/delete (IDsReq) returns (BaseMsgResp)
  44. // Get contact_field_template by ID | 通过ID获取 ContactFieldTemplate
  45. @handler getContactFieldTemplateById
  46. post /contact_field_template () returns (ContactFieldTemplateInfoResp)
  47. }