People
ThePeople interface represents a person/recipient in the system who can receive scheduled messages.
Type Definition
Properties
Unique identifier for the person record.
The person’s full name. Must not be empty.
This name is displayed in the UI when showing message recipients.
The person’s phone number in Bangladesh format.
Usage
This type is used throughout the application: In Components:Messages.tsx:50- Storing people list from APIMessages.tsx:56- Passed to Message componentMessages.tsx:70- Passed to CreateMessageFormMessages.tsx:77- Message component propsMessages.tsx:99- Passed to MessageUpdateForm
- Returned from
GET /people/allendpoint - Used in person creation operations
- Used to populate recipient dropdowns in message forms
- Displayed as options when creating/updating messages
Phone Number Validation
The phone number format is enforced using Zod schema validation in server actions:Related Types
- Message - References People via
sendToproperty - PersonPrevState - Person form state