feat: Add City entity methods and migration for title field
- Created a new JSON file for the City entity's AST representation, detailing its methods and properties. - Added a migration to alter the cities table by adding a nullable title column.
This commit is contained in:
@@ -42,6 +42,11 @@ table columns (the same keys an import expects), so export → import is lossles
|
||||
}
|
||||
```
|
||||
|
||||
For `cities` the export rows carry every column plus `province_name`, and
|
||||
`social_media` is returned as a JSON **object** — the exact shape
|
||||
`nobat724_front/data/city.json` uses, so the export file can be dropped into the
|
||||
frontend (and re-imported) without any transformation.
|
||||
|
||||
### Errors
|
||||
| Code | HTTP | Description |
|
||||
|------|------|-------------|
|
||||
@@ -84,6 +89,8 @@ A non-empty array of records, or `{ "items": [ … ] }`. Max **5000** rows.
|
||||
| `parent_id` | `specialties`: null, or an `id` present **in the same file** |
|
||||
| `specialty_id` | `doctor_services`: null, or an existing `specialties.id` |
|
||||
| `province_id` / `representation_id` | `cities`: null, or an existing id in the referenced table |
|
||||
| `title`, `site_name`, `slogan`, `domain`, `keywords`, `description`, `footer_description`, `contact_phone`, `email`, `logo_url` | `cities`: optional SEO/branding strings (`title` = meta title of the city website) |
|
||||
| `social_media` | `cities`: optional; JSON object (e.g. `{"instagram": "…"}`) or its string form — stored as JSON |
|
||||
|
||||
### Response `200`
|
||||
```json
|
||||
|
||||
@@ -188,6 +188,7 @@ Create a new city.
|
||||
|-------|------|----------|-------------|
|
||||
| `name` | string | ✅ | City name |
|
||||
| `site_name` | string | ❌ | Public site name shown on the city's booking website (e.g. `"یزد نوبت"`) |
|
||||
| `title` | string | ❌ | SEO meta title for the city's booking website (e.g. `"نوبتدهی آنلاین پزشکان یزد | یزد نوبت"`) |
|
||||
| `province_id` | integer | ❌ | Parent province ID |
|
||||
| `status` | string | ❌ | `"active"` or `"inactive"` |
|
||||
| `weight` | integer | ❌ | Sort weight |
|
||||
|
||||
Reference in New Issue
Block a user