The data type defines what kind of data the field can store. Choosing the correct field type ensures:
- Better data validation
- Efficient database queries
- Accurate API responses
Supported Field Types
EazeMyAPI currently supports the following field types.TEXT
The TEXT type stores short text values. Common uses:- names
- titles
- usernames
- city names
NUMBER
The NUMBER type stores integer numbers. Common uses:- age
- quantity
- counts
- IDs
PARAGRAPH
The PARAGRAPH type stores long text content. Common uses:- descriptions
- blog content
- notes
- comments
DECIMAL
The DECIMAL type stores numbers with decimal values. Common uses:- prices
- ratings
- percentages
- measurements
DATE
The DATE type stores a calendar date. Common uses:- birth date
- event date
- joining date
DATETIME
The DATETIME type stores both date and time. Common uses:- created_at
- updated_at
- event timestamps
PASSWORD
The PASSWORD type stores secure password values. Passwords are encrypted before being stored. Example:- user login
- account registration
- contact information
PHONE
The PHONE type stores phone numbers. Example:BOOLEAN
The BOOLEAN type stores true or false values. Common uses:- active status
- verification status
- feature flags
Example Table
Example users table:| Field | Type |
|---|---|
| id | NUMBER |
| name | TEXT |
| phone | PHONE |
| bio | PARAGRAPH |
| is_active | BOOLEAN |
| created_at | DATETIME |
Example API Request
After creating a table, EazeMyAPI automatically generates APIs. Example endpoint:Best Practices
When choosing field types:- Use TEXT for short text
- Use PARAGRAPH for long content
- Use NUMBER for integers
- Use DECIMAL for prices or ratings
- Use BOOLEAN for true/false values
- Use DATETIME for timestamps

