> ## Documentation Index
> Fetch the complete documentation index at: https://memberpulseptyltd.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Course (LMS)

> LMS course entity with content structure

LMS course entity with content structure

Represents courses in the Learning Management System.

## Fields

### Field Registry (from `workspace/sources/entity-registry.csv`)

| Field                     | Input Type         | Required     | Notes                                                                                                                                   |
| ------------------------- | ------------------ | ------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| Course ID                 | Number             | Required     | Automatically generated                                                                                                                 |
| Course Name               | Text               | Required     | model: `name`                                                                                                                           |
| Tile Short Description    | Text               | Required     | Course Description (First 135 Characters Will Show In Course Tile) ?                                                                    |
| Course Description        | WYSIWYG (Textarea) | Required     | model: `description`                                                                                                                    |
| Course Category           | Multi-select       | Required     | Autocomplete design (many to many selector); model: `courseCategories`, rel: ManyToMany CourseCategory                                  |
| Course featured image     | File               | Required     | Single Image; model: `featuredImage`, rel: string imageFile                                                                             |
| Series                    | Multi-select       | -            | model: `courseSeries`, rel: OneToMany CourseSeries                                                                                      |
| Branches                  | Multi-select       | -            | model: `courseBranches`, rel: OneToMany CourseBranches                                                                                  |
| Course Type               | Selector           | Required     | Pulls through a list of different types (eg. video, pdf); model: `courseType`, rel: ManyToOne CourseType                                |
| Course Author             | Text               | Required     | model: `author`, rel: string                                                                                                            |
| Publish Date              | Date               | Required     | Calendar Selector; model: `publishDateTime`, rel: datetime                                                                              |
| Publish Time              | -                  | -            | model: `publishDateTime`, rel: datetime                                                                                                 |
| Estimated Completion Time | Number             | Required     | In minutes; model: `estimatedCompletionTime`, rel: integer                                                                              |
| Start Date                | Date               | Required     | Calendar Selector; model: `startDate`, rel: datetime                                                                                    |
| Close Date                | Date               | Not Required | If this is selected, must have logic to be after start date and it means the tile should; model: `closeDate`, rel: datetime             |
| CPD Points                | Number             | Required     | model: `cpdPoints`, rel: float                                                                                                          |
| CPD Category              | Multi-select       | Required     | Autocomplete design (many to many selector); model: `cpdCategories`, rel: OneToMany CpdCategory                                         |
| Members Price             | Text               | Required     | -                                                                                                                                       |
| Members Limit             | Number             | Not Required | model: `membersLimit`, rel: integer                                                                                                     |
| Non-Members Price         | Text               | Required     | model: `nonMembersPrice`, rel: float                                                                                                    |
| Non-Members Limit         | Number             | Not Required | model: `nonMembersLimit`, rel: integer                                                                                                  |
| General Attendance Limit  | Number             | Not Required | Separate to the above, however total of this should equal to the two fields if filled in; model: `generalAttendanceLimit`, rel: integer |
| Status                    | -                  | -            | model: `status`, rel: ManyToOne CourseStatus                                                                                            |
| Sponsor Name              | Text               | Not Required | Repeater Field / You will need a sponsorship entity                                                                                     |
| Sponsor URL               | URL                | Not Required | -                                                                                                                                       |
| Sponsor Logo              | File               | Not Required | -                                                                                                                                       |
| Subject Name              | Text               | Required     | model: `name`                                                                                                                           |
| Subject Description       | Text               | Required     | model: `description`                                                                                                                    |
| Subject Duration          | Number             | Required     | In minutes - if left empty the timer is infinite; model: `duration`                                                                     |
| Subject Time Remaining    | Number             | Required     | For members only - if the subject is paused; model: `timeRemaining`                                                                     |
| Subject File              | File               | Required     | Video / Document; model: `subjectFile`                                                                                                  |
| File Thumbnail            | File               | Not Required | Image for the thumbnail - requires default thumbnails if not selected; model: `fileThumbnail`                                           |
| Zoom Link                 | Selector           | Required     | API - pulls through a list of all available zoom videos; model: `zoomLink`                                                              |
| Questions Required        | True / False       | Required     | Show/Hides the Question UI - this means a subject can be completed without answering questions; model: `isQuestionsRequired`            |
| How many questions        | Number             | Required     | If questions are required - generates a list of empty questions (fields below); model: `numberOfQuestions`                              |
| Generate with AI          | Yes / No           | Required     | Button for now - this will trigger the AI API to generate the list of questions; model: `generateWithAI`                                |
| Question Type             | Selector           | Required     | model: `questionType`, rel: enum single\_answer, multiple\_answer                                                                       |
| Question                  | Text               | Required     | model: `text`                                                                                                                           |
| Answer                    | -                  | Required     | Based on type, it can be (radio, checkbox) - this also needs a checkbox to choose the right answer                                      |
| Generate with AI          | Button             | Not Required | Press to trigger AI to generate for this question                                                                                       |

## Embedded: Subject List

| Field       | Type    | Description         |
| ----------- | ------- | ------------------- |
| subjectId   | UUID    | Subject ID          |
| name        | string  | Subject name        |
| description | text    | Subject description |
| order       | integer | Display order       |
| content     | array   | Content items       |

### Content Item Structure

| Field         | Type   | Description             |
| ------------- | ------ | ----------------------- |
| contentType   | enum   | video, pdf, text, quiz  |
| contentUrl    | string | Content URL/body        |
| question      | string | Quiz question           |
| answer        | string | Correct answer          |
| answerOptions | array  | Multiple choice options |

## Relationships

| Relation    | Type      | Target Entity    |
| ----------- | --------- | ---------------- |
| enrollments | OneToMany | CourseEnrollment |

## Features

### Course (LMS)

#### Acceptance Criteria

##### Frontend

* [ ] Admin/client UI can view and manage `Course (LMS)` records where applicable.

##### Backend / API

* [ ] CRUD operations exist for `Course (LMS)` (create, read, update, delete/archive).

##### Permissions

* [ ] Access is restricted to appropriate roles (tenant-scoped).

##### Business Rules

* [ ] Fields and relationships documented on this page are enforced for `Course (LMS)`.

##### Error Handling

* [ ] Invalid payloads return field-level validation errors.
