> ## 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.

# Interest Category

> Member interest category for content targeting

Member interest category for content targeting

Defines interest categories for content generation and member targeting.

## Fields

### Core Fields

| Field       | Type   | Required | Description            |
| ----------- | ------ | -------- | ---------------------- |
| id          | UUID   | Auto     | Primary key            |
| name        | string | Yes      | Category name (unique) |
| description | text   | No       | Category description   |
| keywords    | array  | No       | AI generation keywords |
| icon        | string | No       | Display icon           |

### Configuration

| Field              | Type    | Required | Description                            |
| ------------------ | ------- | -------- | -------------------------------------- |
| active             | boolean | Yes      | Category active (default: true)        |
| displayOrder       | integer | No       | Sort order                             |
| itemsPerGeneration | integer | No       | Content items to generate (default: 5) |
| generationPrompt   | text    | No       | Custom AI prompt                       |

### Metrics

| Field          | Type    | Required | Description                |
| -------------- | ------- | -------- | -------------------------- |
| memberCount    | integer | Auto     | Members with this interest |
| contentCount   | integer | Auto     | Published content items    |
| engagementRate | decimal | Auto     | Average engagement %       |

### System Fields

| Field     | Type     | Required | Description        |
| --------- | -------- | -------- | ------------------ |
| createdAt | datetime | Auto     | Creation timestamp |
| updatedAt | datetime | Auto     | Last update        |

## Relationships

| Relation | Type       | Target Entity                |
| -------- | ---------- | ---------------------------- |
| content  | OneToMany  | GeneratedContent             |
| members  | ManyToMany | Member (via MemberInterests) |

## Validation Rules

* Name must be unique per organization
* At least one active category required for generation
* Keywords recommended for better AI content

## Features

### Interest Category

#### Acceptance Criteria

##### Frontend

* [ ] Admin/client UI can view and manage `Interest Category` records where applicable.

##### Backend / API

* [ ] CRUD operations exist for `Interest Category` (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 `Interest Category`.

##### Error Handling

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