|
@@ -24,11 +24,6 @@ const upload = require('multer')({ dest: uploadPath })
|
|
|
login: String
|
|
|
nick : String
|
|
|
avatar: Image
|
|
|
- likes: [Like]
|
|
|
- likesCount: Int
|
|
|
- incomings: [Direct]
|
|
|
- followers: [User]
|
|
|
- following: [User]
|
|
|
}
|
|
|
|
|
|
input UserInput {
|
|
@@ -36,47 +31,6 @@ const upload = require('multer')({ dest: uploadPath })
|
|
|
login: String
|
|
|
nick : String
|
|
|
avatar: ImageInput
|
|
|
- following: [UserInput]
|
|
|
- }
|
|
|
-
|
|
|
- type Like {
|
|
|
- _id: ID,
|
|
|
- post: Post,
|
|
|
- comment: Comment,
|
|
|
- direct: Direct,
|
|
|
- owner: User
|
|
|
- }
|
|
|
-
|
|
|
- input LikeInput {
|
|
|
- _id: ID,
|
|
|
- post: PostInput,
|
|
|
- comment: CommentInput,
|
|
|
- direct: DirectInput,
|
|
|
- user: UserInput,
|
|
|
- }
|
|
|
-
|
|
|
- type Post {
|
|
|
- _id: ID,
|
|
|
- createdAt: String
|
|
|
- title: String
|
|
|
- text: String,
|
|
|
- images: [Image],
|
|
|
- comments: [Comment],
|
|
|
- directs: [Direct],
|
|
|
- collections: [Collection]
|
|
|
- likes: [Like]
|
|
|
- likesCount: Int
|
|
|
- owner: User
|
|
|
- }
|
|
|
-
|
|
|
- input PostInput {
|
|
|
- _id: ID,
|
|
|
- title: String,
|
|
|
- text: String,
|
|
|
- images: [ImageInput],
|
|
|
- comments: [CommentInput],
|
|
|
- directs: [DirectInput],
|
|
|
- collections: [CollectionInput]
|
|
|
}
|
|
|
|
|
|
type Image {
|
|
@@ -85,8 +39,8 @@ const upload = require('multer')({ dest: uploadPath })
|
|
|
url: String,
|
|
|
originalFileName: String,
|
|
|
userAvatar: User,
|
|
|
- posts: [Post],
|
|
|
- directs: [Direct]
|
|
|
+ good: Good
|
|
|
+ category: Category
|
|
|
owner: User
|
|
|
}
|
|
|
|
|
@@ -94,62 +48,67 @@ const upload = require('multer')({ dest: uploadPath })
|
|
|
_id: ID,
|
|
|
text: String,
|
|
|
userAvatar: UserInput,
|
|
|
- posts: [PostInput],
|
|
|
- directs: [DirectInput]
|
|
|
+ good: GoodInput
|
|
|
+ category: CategoryInput
|
|
|
}
|
|
|
|
|
|
- type Comment {
|
|
|
+ type Category {
|
|
|
_id: ID,
|
|
|
- createdAt: String,
|
|
|
- text: String,
|
|
|
- post: Post,
|
|
|
- answers: [Comment],
|
|
|
- answerTo: Comment
|
|
|
- likes: [Like]
|
|
|
- likesCount: Int
|
|
|
- owner: User
|
|
|
+ name: String!,
|
|
|
+ goods: [Good]
|
|
|
+ image: Image
|
|
|
}
|
|
|
|
|
|
- input CommentInput {
|
|
|
+ input CategoryInput {
|
|
|
_id: ID,
|
|
|
- text: String,
|
|
|
- post: PostInput,
|
|
|
- answers: [CommentInput],
|
|
|
- answerTo: CommentInput
|
|
|
+ name: String!,
|
|
|
+ goods: [ID]
|
|
|
+ image: ImageInput
|
|
|
}
|
|
|
|
|
|
- type Direct {
|
|
|
+ type Good {
|
|
|
_id: ID,
|
|
|
- createdAt: String,
|
|
|
- text: String,
|
|
|
- post: Post,
|
|
|
- image: Image,
|
|
|
- likes: [Like]
|
|
|
- likesCount: Int
|
|
|
- to: User
|
|
|
- owner: User
|
|
|
+ name: String!,
|
|
|
+ description: String
|
|
|
+ price: Float
|
|
|
+ orderGoods: [OrderGood]
|
|
|
+ categories: [Category]
|
|
|
+ images: [Image]
|
|
|
}
|
|
|
|
|
|
- input DirectInput {
|
|
|
+ input GoodInput {
|
|
|
_id: ID,
|
|
|
- text: String,
|
|
|
- post: PostInput,
|
|
|
- image: ImageInput,
|
|
|
- likes: [LikeInput]
|
|
|
- to: UserInput
|
|
|
+ name: String!,
|
|
|
+ description: String
|
|
|
+ price: Float
|
|
|
+ categories: [CategoryInput]
|
|
|
+ images: [ImageInput]
|
|
|
}
|
|
|
|
|
|
- type Collection {
|
|
|
+ type OrderGood {
|
|
|
_id: ID,
|
|
|
- text: String,
|
|
|
- posts: [Post]
|
|
|
- owner: User
|
|
|
+ price: Float,
|
|
|
+ count: Float,
|
|
|
+ good: Good,
|
|
|
+ order: Order
|
|
|
}
|
|
|
|
|
|
- input CollectionInput {
|
|
|
+ input OrderGoodInput {
|
|
|
_id: ID,
|
|
|
- text: String,
|
|
|
- posts: [PostInput]
|
|
|
+ count: Int!,
|
|
|
+ good: [GoodInput],
|
|
|
+ order: [OrderInput]
|
|
|
+ }
|
|
|
+
|
|
|
+ type Order {
|
|
|
+ _id: ID
|
|
|
+ total: Float
|
|
|
+ orderGoods: [OrderGood]
|
|
|
+ }
|
|
|
+
|
|
|
+ input OrderInput {
|
|
|
+ _id: ID
|
|
|
+ orderGoods: [OrderGoodInput]
|
|
|
}
|
|
|
`);
|
|
|
|