.lessonPrivate.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. module.exports = {
  2. create: {
  3. requestBody: ['school_id', 'title', 'coach_id', 'money', 'limit', 'student', 'time_start', 'time_end', 'status', 'brief'],
  4. },
  5. destroy: {
  6. params: ['!id'],
  7. service: 'delete',
  8. },
  9. update: {
  10. params: ['!id'],
  11. requestBody: ['school_id', 'title', 'coach_id', 'money', 'limit', 'student', 'time_start', 'time_end', 'status', 'brief'],
  12. },
  13. show: {
  14. parameters: {
  15. params: ['!id'],
  16. },
  17. service: 'fetch',
  18. },
  19. index: {
  20. parameters: {
  21. query: {
  22. 'meta.createdAt@start': 'meta.createdAt@start',
  23. 'meta.createdAt@end': 'meta.createdAt@end',
  24. school_id: 'school_id',
  25. coach_id: 'coach_id',
  26. student: 'student',
  27. 'time_start@start': 'time_start@start',
  28. 'time_start@end': 'time_start@end',
  29. 'time_end@start': 'time_end@start',
  30. 'time_end@end': 'time_end@end',
  31. status: 'status',
  32. },
  33. // options: {
  34. // "meta.state": 0 // 默认条件
  35. // },
  36. },
  37. service: 'query',
  38. options: {
  39. query: ['skip', 'limit'],
  40. sort: ['meta.createdAt'],
  41. desc: true,
  42. count: true,
  43. },
  44. },
  45. };