Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type Session @model @auth(rules: [{allow: private}]) {
- id: ID!
- start: String!
- end: String!
- trackerperiodID: ID! @index(name: "byTrackerPeriod")
- }
- type DeviceState @model @auth(rules: [{allow: private}]) {
- id: ID!
- Time: String!
- State: String!
- trackerperiodID: ID! @index(name: "byTrackerPeriod")
- }
- type SubPeriod @model @auth(rules: [{allow: private}]) {
- id: ID!
- Range: String!
- MovementCount: Int!
- trackerperiodID: ID! @index(name: "byTrackerPeriod")
- }
- type TrackerPeriod @model @auth(rules: [{allow: owner}]) {
- id: ID!
- WakeUpTime: String!
- SleepTime: String!
- AverageMovementCount: String
- SleepDuration: String
- DurationInNumbers: String
- DisturbancesCount: String
- TotalMovements: Int
- AccelerometerLastReading: Float
- createdAt: AWSDateTime!
- userID: ID! @index(name: "byUser")
- Sessions: [Session] @hasMany(indexName: "byTrackerPeriod", fields: ["id"])
- DeviceStates: [DeviceState] @hasMany(indexName: "byTrackerPeriod", fields: ["id"])
- SubPeriods: [SubPeriod] @hasMany(indexName: "byTrackerPeriod", fields: ["id"])
- ActualSleepTime: String
- ActualWakeUpTime: String
- }
- type DayGroup {
- SleepTime: String!
- WakeUpTime: String!
- Days: [String]!
- }
- type User @model @auth(rules: [{allow: owner}]) {
- id: ID!
- sid: String!
- studyId: String!
- offDay: DayGroup!
- workday: DayGroup!
- tracker: [TrackerPeriod] @hasMany(indexName: "byUser", fields: ["id"])
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement