Advertisement
minafaw3

appOne.Schema

Jun 5th, 2023
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. type Session @model @auth(rules: [{allow: public}]) {
  2. id: ID!
  3. start: String!
  4. end: String!
  5. trackerperiodID: ID! @index(name: "byTrackerPeriod")
  6. }
  7.  
  8. type DeviceState @model @auth(rules: [{allow: public}]) {
  9. id: ID!
  10. Time: String!
  11. State: String!
  12. trackerperiodID: ID! @index(name: "byTrackerPeriod")
  13. }
  14.  
  15. type SubPeriod @model @auth(rules: [{allow: public}]) {
  16. id: ID!
  17. Range: String!
  18. MovementCount: Int!
  19. trackerperiodID: ID! @index(name: "byTrackerPeriod")
  20. }
  21.  
  22. type TrackerPeriod @model @auth(rules: [{allow: public}]) {
  23. id: ID!
  24. WakeUpTime: String!
  25. SleepTime: String!
  26. AverageMovementCount: String
  27. SleepDuration: String
  28. DurationInNumbers: String
  29. DisturbancesCount: String
  30. TotalMovements: Int
  31. AccelerometerLastReading: Float
  32. createdAt: AWSDateTime!
  33. ActualSleepTime: String
  34. ActualWakeUpTime: String
  35. Sessions: [Session] @hasMany(indexName: "byTrackerPeriod", fields: ["id"])
  36. DeviceStates: [DeviceState] @hasMany(indexName: "byTrackerPeriod", fields: ["id"])
  37. SubPeriods: [SubPeriod] @hasMany(indexName: "byTrackerPeriod", fields: ["id"])
  38. userID: ID! @index(name: "byUser")
  39. }
  40.  
  41. type DayGroup {
  42. SleepTime: String!
  43. WakeUpTime: String!
  44. Days: [String]!
  45. }
  46.  
  47. type User @model @auth(rules: [{allow: public}]) {
  48. id: ID!
  49. sid: String!
  50. offDay: DayGroup!
  51. workday: DayGroup!
  52. studyId: String!
  53. tracker: [TrackerPeriod] @hasMany(indexName: "byUser", fields: ["id"])
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement