# Feature

{% hint style="info" %}
To learn more about this concept of database & coding reflection, please visit developers.jframework.io.
{% endhint %}

A feature is a specific functionality or capability of a software product or service that delivers value to the end user. Features can range from basic functions like opening and saving files to more complex capabilities like collaboration tools, reporting and analytics, or integration with other software systems.

### Feature Type Design

Each **Feature** associated with a **Package** has the following attributes:

* **Type:** Determines how the feature is measured or restricted.
  * `Function`: A binary feature that can either be **enabled** or **disabled**.
    * **Value = 1:** The feature is enabled.
    * **Value = 0:** The feature is disabled.
  * `Limited`: A feature that has a limited quantity or usage.
    * **Value = n (≥ 0):** The number of times the feature can be used.
  * `Unlimited`: A feature with no usage restrictions.
    * **Value = -1:** Indicates that the feature is unlimited.

***

#### Example Table:

| Feature Name | Type      | Value | Description                               |
| ------------ | --------- | ----- | ----------------------------------------- |
| Device       | Function  | 1     | Access to devices enabled                 |
| Users        | Limited   | 50    | Maximum number of users allowed           |
| Organization | Unlimited | -1    | Unlimited access to organization features |

***

#### How It Works:

* **Function-type features** are binary. They are either turned **on (1)** or **off (0)**.
* **Limited features** have a specific numeric limit. The system tracks usage against this value.
* **Unlimited features** use `-1` as a placeholder to indicate no limit, simplifying calculations in pricing tables and usage reports.
