diff --git a/docs/cooperation/cooperation-schema.yaml b/docs/cooperation/cooperation-schema.yaml index 765520c6..20ec1f4b 100644 --- a/docs/cooperation/cooperation-schema.yaml +++ b/docs/cooperation/cooperation-schema.yaml @@ -11,9 +11,33 @@ definitions: items: type: string subject: - type: string + type: object + properties: + name: + type: string category: - type: string + type: object + properties: + appearance: + type: object + properties: + color: + type: string + icon: + type: string + user: + type: object + properties: + _id: + type: string + firstName: + type: string + lastName: + type: string + photo: + type: string + role: + type: string description: type: string languages: @@ -59,26 +83,15 @@ definitions: type: string offer: type: string + ref: '#components/offer' initiator: type: string + ref: '#/components/user' initiatorRole: type: string - proficiencyLevel: - type: array - items: - type: string - subject: - type: string - category: - type: string - description: - type: string - languages: - type: array - items: - type: string receiver: type: string + ref: '#components/user' receiverRole: type: string price: @@ -207,28 +220,11 @@ definitions: properties: _id: type: string - proficiencyLevel: - type: array - items: - type: string - title: - type: string - description: - type: string - languages: - type: array - items: - type: string author: type: object properties: - totalReviews: - type: object - properties: - student: - type: integer - tutor: - type: integer + _id: + type: string averageRating: type: object properties: @@ -236,8 +232,6 @@ definitions: type: number tutor: type: number - _id: - type: string firstName: type: string lastName: @@ -246,246 +240,57 @@ definitions: type: string professionalSummary: type: string - subject: - type: object - properties: - _id: - type: string - name: - type: string - category: - type: object - properties: - appearance: + totalReviews: type: object properties: - color: - type: string - icon: - type: string - _id: - type: string - name: - type: string + student: + type: number + tutor: + type: number initiator: + type: string + initiatorRole: + type: string + proficiencyLevel: + type: array + items: + type: string + subject: type: object properties: - address: - type: object - properties: - country: - type: string - city: - type: string - mainSubjects: - type: object - properties: - student: - type: array - items: - type: string - tutor: - type: array - items: - type: string - totalReviews: - type: object - properties: - student: - type: integer - tutor: - type: integer - averageRating: - type: object - properties: - student: - type: number - tutor: - type: number - status: - type: object - properties: - student: - type: string - tutor: - type: string - admin: - type: string - videoLink: - type: object - properties: - student: - type: string - professionalBlock: - type: object - properties: - awards: - type: string - scientificActivities: - type: string - workExperience: - type: string - education: - type: string - notificationSettings: - type: object - properties: - isOfferStatusNotification: - type: boolean - isChatNotification: - type: boolean - isSimilarOffersNotification: - type: boolean - isEmailNotification: - type: boolean - _id: - type: string - role: - type: array - items: - type: string - firstName: - type: string - lastName: - type: string - email: + name: type: string - nativeLanguage: - type: string - lastLogin: - type: string - createdAt: - type: string - updatedAt: - type: string - professionalSummary: - type: string - initiatorRole: - type: string - receiver: + category: type: object properties: - address: + appearance: type: object properties: - country: + color: type: string - city: + icon: type: string - mainSubjects: - type: object - properties: - student: - type: array - items: - type: string - tutor: - type: array - items: - type: object - properties: - category: - type: string - subjects: - type: array - items: - type: string - _id: - type: string - totalReviews: - type: object - properties: - student: - type: integer - tutor: - type: integer - averageRating: - type: object - properties: - student: - type: number - tutor: - type: number - status: - type: object - properties: - student: - type: string - tutor: - type: string - admin: - type: string - videoLink: - type: object - properties: - tutor: - type: string - professionalBlock: - type: object - properties: - awards: - type: string - scientificActivities: - type: string - workExperience: - type: string - education: - type: string - notificationSettings: - type: object - properties: - isOfferStatusNotification: - type: boolean - isChatNotification: - type: boolean - isSimilarOffersNotification: - type: boolean - isEmailNotification: - type: boolean - _id: - type: string - role: - type: array - items: - type: string - firstName: - type: string - lastName: - type: string - email: - type: string - nativeLanguage: - type: string - lastLogin: - type: string - createdAt: - type: string - updatedAt: - type: string - photo: - type: string - professionalSummary: - type: string - receiverRole: + description: type: string - title: + languages: + type: array + items: + type: string + receiver: type: string - proficiencyLevel: + receiverRole: type: string price: - type: integer - status: + type: number + title: type: string - needAction: + status: type: string - availableQuizzes: - type: array - items: - type: string - finishedQuizzes: - type: array - items: - type: string + enum: + - pending + - active + - declined + - closed sections: type: array items: @@ -523,7 +328,14 @@ definitions: type: string format: date-time default: null + needAction: + type: string + enum: + - student + - tutor createdAt: type: string + format: date-time updatedAt: type: string + format: date-time diff --git a/docs/cooperation/cooperation.yaml b/docs/cooperation/cooperation.yaml index d2e0e589..e8fe656d 100644 --- a/docs/cooperation/cooperation.yaml +++ b/docs/cooperation/cooperation.yaml @@ -25,8 +25,16 @@ paths: receiverRole: student title: 'Violin lessons' proficiencyLevel: ['Intermediate'] - subject: 6255bc080a75adf9223df101 - category: 6255bc080a75adf9223df102 + subject: { name: 'Music' } + category: { appearance: { color: '#E3B21C', icon: 'ScienceRoundedIcon' } } + user: + { + _id: '66b0aecdadd1fe775238c7d5', + firstName: 'Pavlo', + lastName: 'Dolia', + photo: '1726302778023-pexels-olly-3769706.jpg', + role: 'student' + } description: "I'll teach you how to play violin" languages: ['English'] price: 200 @@ -45,8 +53,16 @@ paths: receiverRole: student title: 'Violin lessons' proficiencyLevel: ['Intermediate'] - subject: 6255bc080a75adf9223df103 - category: 6255bc080a75adf9223df104 + subject: { name: 'Music' } + category: { appearance: { color: '#E3B21C', icon: 'ScienceRoundedIcon' } } + user: + { + _id: '66b0aecdadd1fe775238c7d5', + firstName: 'Pavlo', + lastName: 'Dolia', + photo: '1726302778023-pexels-olly-3769706.jpg', + role: 'student' + } description: "I'll teach you how to play violin" languages: ['English'] price: 300 @@ -189,40 +205,22 @@ paths: _id: 8755bc080a00adr9243df106 description: "I'll teach you how to play violin" languages: ['English'] - subject: '656605be8bebd72f0be55a3d' - category: '6566040f8bebd72f0be55a28' + subject: { name: 'Music' } + category: { appearance: { color: '#E3B21C', icon: 'ScienceRoundedIcon' } } offer: - _id: 63ebc6fbd2f34037d0aba791 - proficiencyLevel: - - Intermediate - - Advanced - - Test Preparation - - Professional - title: 'Understanding Quadratic Equations' - description: "In this lesson, we will delve into the world of quadratic equations. We'll explore the standard form of a quadratic equation, learn how to identify the coefficients, and understand the significance of the discriminant. Students will also practice solving quadratic equations using various methods, including factoring, completing the square, and the quadratic formula. By the end of the lesson, students will be able to solve quadratic equations confidently and understand their graphical representations." - languages: - - English - author: - totalReviews: - student: 0 - tutor: 0 - averageRating: - student: 0 - tutor: 0 - _id: 6658f73f93885febb491e08b - firstName: 'John' - lastName: 'Doe' - photo: '6658f73f93885-test_student.png' - professionalSummary: 'I am student of the University of Cambridge. I am passionate about learning mathematics.' - subject: - _id: 6566133a2bccdd3e18dbe943 - name: 'Algebra' - category: - appearance: - color: '#E3B21C' - icon: 'TagRoundedIcon' - _id: '64884f33fdc2d1a130c24ac2' - name: 'Mathematics' + { + _id: 63ebc6fbd2f34037d0aba791, + author: + { + _id: '66a7abbab3168fa64a8f5af1', + averageRating: { student: 0, tutor: 0 }, + firstName: 'John', + lastName: 'Doe', + photo: '1726302583778-pexels-vanessa-garcia-6326377.jpg', + professionalSummary: 'I have 12 years of experience', + totalReviews: { student: 0, tutor: 0 } + } + } initiator: address: country: 'USA'