components:
  schemas:

    RegisterStudent:
      type: object
      required:
        - full_name
        - email
        - password
        - birth_date
        - cpf
        - telephone
        - academic
        - class_preferences

      properties:
        full_name:
          type: string
          description: Student's full name
          example: "Maria Silva Santos"

        birth_date:
          type: string
          format: date
          description: Student's birth date
          example: "2005-03-15"

        cpf:
          type: object
          required:
            - value

          properties:
            value:
              type: string
              description: Teacher's CPF number
              example: "123.456.789-00"

            upload_id:
              type: string
              description: ID of the uploaded CPF document
              example: "doc_12345"

        telephone:
          type: string
          description: Contact telephone number
          example: "+55 (11) 99999-9999"

        email:
          type: string
          description: User's email
          format: email
          example: "maria.silva@email.com"

        password:
          type: string
          description: User's password
          format: password
          example: "P@ssword123!"

        academic:
          type: object
          required:
            - current_grade
            - subjects
            - difficulty_level
            - main_goal

          properties:
            current_grade:
              type: string
              description: Student's current grade/year
              example: "10th grade"

            school:
              type: string
              description: School name
              example: "São Paulo State School"

            subjects:
              type: array
              items:
                type: string
              description: Subjects for tutoring
              example: ["Mathematics", "Physics", "Chemistry"]

            difficulty_level:
              type: string
              description: Current difficulty level
              example: "Intermediate"

            main_goal:
              type: string
              description: Main goal with the classes
              example: "Improve grades and prepare for university entrance exams"

        class_preferences:
          type: object
          required:
            - frequency
            - available_times

          properties:
            frequency:
              type: string
              description: Desired class frequency
              example: "Twice a week"

            avaliable_times:
              type: array
              description: Available time slots for classes
              items:

                type: object
                properties:
                  day_of_week:
                    type: number
                    description: "Number of day of week. 0: Sunday, 1: Monday..."
                    example: 0

                  start_time:
                    type: number
                    description: "Start time (H * 60). 8:30 = 510"
                    example: 510

                  end_time:
                    type: number
                    description: "End time (H * 60). 12:00 = 720"
                    example: 720

            preferred_teacher:
              type: string
              description: Preferred teacher (if any)
              example: "Teacher João Lima"

        guardian:
          type: object
          description: Guardian information (for underage students)
          required:
            - full_name
            - birth_date
            - telephone
            - email
            - relationship
            - cpf
            - rg

          properties:
            full_name:
              type: string
              description: Guardian's full name
              example: "Carlos Silva Santos"

            birth_date:
              type: string
              format: date
              description: Guardian's birth date
              example: "1980-08-20"

            telephone:
              type: string
              description: Guardian's telephone number
              example: "+55 (11) 98888-8888"

            email:
              type: string
              description: Guardian's email
              format: email
              example: "carlos.silva@email.com"

            relationship:
              type: string
              description: Relationship to the student
              example: "father"

            cpf:
              type: object
              required:
                - value

              properties:
                value:
                  type: string
                  description: Teacher's CPF number
                  example: "123.456.789-00"

                upload_id:
                  type: string
                  description: ID of the uploaded CPF document
                  example: "doc_12345"

            rg:
              type: object
              required:
                - value

              properties:
                value:
                  type: string
                  description: Teacher's RG document number
                  example: "12.345.678-9"

                upload_id:
                  type: string
                  description: ID of the uploaded RG document
                  example: "doc_12346"