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

# Membership Plan

> Subscription plan entity with pricing and benefits

Subscription plan entity with pricing and benefits

Defines membership subscription plans with pricing, benefits, and billing configuration.

## Fields

### Core Fields

| Field         | Type    | Required | Description              |
| ------------- | ------- | -------- | ------------------------ |
| id            | UUID    | Auto     | Primary key              |
| name          | string  | Yes      | Plan name (unique)       |
| priceType     | enum    | Yes      | monthly, annually        |
| price         | decimal | Yes      | Plan price               |
| taxInclusion  | boolean | Yes      | Price includes tax       |
| discountPrice | decimal | No       | Promotional price        |
| benefits      | json    | No       | Array of benefit strings |

### Plan Features

| Field                       | Type    | Required | Description           |
| --------------------------- | ------- | -------- | --------------------- |
| automaticDiscountPercentage | decimal | No       | Auto-discount %       |
| freeEventTickets            | integer | No       | Free tickets per year |

### Billing Configuration

| Field            | Type    | Required | Description                       |
| ---------------- | ------- | -------- | --------------------------------- |
| gracePeriodDays  | integer | No       | Days after expiry (default: 7)    |
| prorationEnabled | boolean | No       | Enable proration (default: false) |

### System Fields

| Field     | Type     | Required | Description                |
| --------- | -------- | -------- | -------------------------- |
| createdAt | datetime | Auto     | Creation timestamp         |
| updatedAt | datetime | Auto     | Last update                |
| status    | enum     | Yes      | active, inactive, archived |

## Relationships

| Relation         | Type      | Target Entity   |
| ---------------- | --------- | --------------- |
| members          | OneToMany | Member          |
| groupMemberships | OneToMany | GroupMembership |

## Validation Rules

* Name must be unique per organization
* Price must be >= 0
* Grace period: 0-30 days
* At least one active plan must exist

## Features

### Membership Plan

#### Acceptance Criteria

##### Frontend

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

##### Backend / API

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

##### Error Handling

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