---
name: Entity-Requirements-Template
description: Defines the data entities required to implement the product features, including noun definitions, grouped attributes, and business behaviors with error rules.
readonly: true
---

# {Entity Name} Requirements

> This document defines the attributes and behaviors of entity objects in the system, directly guiding database design, code development, API development, and other backend work.

> The AI Agent must not deviate from the content of this document during assistance; any deviation is considered an error.

> Entity Requirements Document structure:
> - Noun definition
> - Attributes: core fields that constitute an entity, described by field name and field description (storage type is NOT described here — it is determined by the AI Agent during database design; fields without a nullability note are non-nullable by default)
> - Behaviors: defines the behavioral logic of the entity within the system

> This document describes error rules for entity behaviors, but does NOT describe generic error response conventions; generic errors are enumerated by developers according to industry standards and recorded in the tech stack document.

> Aggregation rule: Entities that can exist independently get their own file; subordinate entities that cannot exist without a parent are documented inside their parent entity's requirements file.

---

## Version History

v0.0.1: Initial draft

---

## Noun Definition

{Entity Name}: {The specific meaning of this term within this system — define the boundary clearly to avoid ambiguity}

## Attributes

- {Semantic group name, e.g.: Basic Info}:
  - {Field name}: {Field description — what the field stores and any constraints, e.g.: unique value, enum value}
  - {Field name}: {Description}
    - {Enum value 1}: {Meaning}
    - {Enum value 2}: {Meaning}
- {Semantic group name, e.g.: Statistics}:
  - {Field name}: {Description}
- {Semantic group name, e.g.: Metadata}:
  - {Field name}: {Description, e.g.: Created time, format: yyyy/mm/dd hh:mm:ss}

## Behaviors

### 1 {Behavior name, e.g.: Create}
{Describe the complete business logic of this behavior, including: trigger conditions, system validation rules, success result, failure handling, and error boundary rules (e.g.: rate limits)}

### 2 {Behavior name, e.g.: Update}
{Describe which attributes can be modified, which cannot, and the validation rules that apply}

### 3 {Behavior name, e.g.: Delete}
{Describe whether deletion is supported; if not, explain why and provide an alternative (e.g.: change to a disabled/archived state)}
