default: {
    checkIfUserCourseTopicExists(
        usercourseid: number,
        topicId: number,
    ): Promise<RowDataPacket[]>;
    deleteUserCourseTopic(usercourseid: number, connection: any): Promise<any>;
    findUserCourseTopicByUserCourseId(
        usercourseid: number,
    ): Promise<RowDataPacket[]>;
    insertUserCourseTopic(
        usercourseid: number,
        topicId: number,
        connection: any,
    ): Promise<any>;
} = ...

Model for managing user course topics.

Type declaration

  • checkIfUserCourseTopicExists:function
    • Checks if a user course topic exists.

      Parameters

      • usercourseid: number

        The ID of the user course.

      • topicId: number

        The ID of the topic.

      Returns Promise<RowDataPacket[]>

      A promise that resolves to the existing user course topic, if any.

  • deleteUserCourseTopic:function
    • Deletes a user course topic.

      Parameters

      • usercourseid: number

        The ID of the user course.

      • connection: any

        The database connection.

      Returns Promise<any>

      A promise that resolves when the deletion is complete.

  • findUserCourseTopicByUserCourseId:function
    • Finds a user course topic by user course ID.

      Parameters

      • usercourseid: number

        The ID of the user course.

      Returns Promise<RowDataPacket[]>

      A promise that resolves to the user course topic, if found.

  • insertUserCourseTopic:function
    • Inserts a user course topic.

      Parameters

      • usercourseid: number

        The ID of the user course.

      • topicId: number

        The ID of the topic.

      • connection: any

        The database connection.

      Returns Promise<any>

      A promise that resolves when the insertion is complete.