-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema-copy.graphql
103 lines (95 loc) · 2.16 KB
/
schema-copy.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
type AmplifyUser @model @auth(rules: [{allow: owner}]) {
id: ID
owner: String
nickName: String
username: String
avatarKey: String
bio: String
email: AWSEmail
realName: String
gender: String
birthday: AWSDate
address: String
phone: AWSPhone
job: String
income: String
marriage: String
socialMedia: AWSJSON
interest: AWSJSON
bigFive: AWSJSON
wellbeingIndex: AWSJSON
actions: [AmplifyAction] @hasMany(indexName: "byCreator", fields: ["id"])
}
type AmplifySensor @model @auth(rules: [{allow: owner}]) {
id: ID
owner: String
trajectory: AWSJSON
health: AWSJSON
social: AWSJSON
}
enum CommitType {
MOMENT
TODO
PERSON
}
type AmplifyCommit @model @auth(rules: [{allow: owner}]) {
id: ID
owner: String
commitType: CommitType!
order: Float!
titleOrName: String
description: String
photoKeys: [String]
audioKeys: [String]
videoKeys: [String]
toBranchID: ID @index(name: "byBranch", sortKeyFields: ["order"])
toBranch: AmplifyBranch @belongsTo(fields: ["toBranchID"])
todoCompletion: Boolean
todoReminder: Boolean
todoStart: AWSDateTime
todoEnd: AWSDateTime
personPriority: Int
personAddress: String
personBirthday: AWSDate
personContact: AWSJSON
personAvatarKey: String
}
type AmplifyBranch @model @auth(rules: [{allow: owner}]) {
id: ID
owner: String
privacyType: PrivacyType!
title: String!
description: String!
squadName: String
commits: [AmplifyCommit] @hasMany(indexName: "byBranch", fields: ["id"])
actions: [AmplifyAction] @hasMany(indexName: "byBranch", fields: ["id"])
numOfLikes: Int
numOfDislikes: Int
numOfComments: Int
numOfShares: Int
numOfSubs: Int
}
type AmplifyAction @model @auth(rules: [{allow: owner}]) {
id: ID
owner: String
creatorID: ID! @index(name: "byCreator", sortKeyFields: ["actionType"])
creator: AmplifyUser! @belongsTo(fields: ["creatorID"])
toBranchID: ID! @index(name: "byBranch", sortKeyFields: ["actionType"])
toBranch: AmplifyBranch! @belongsTo(fields: ["toBranchID"])
actionType: String!
content: String
}
enum PrivacyType {
OPEN
PRIVATE
LIMITED
}
enum ActionType {
MESSAGE
COMMENT
SUB
LIKE
DISLIKE
SHARE
PARTICIPATE
}