| phone_id | string, UUID, 🔒 system | ✅ Yes | unique; generated by gen_random_uuid() on INSERT | — | Public stable identifier for the phone number. Used in all API responses and cross-resource references. The internal pk is never exposed. |
| country_code | integer | ✅ Yes | NOT NULL | Any valid ITU-T calling code (e.g. 1, 33, 44, 49) | The international dialing prefix without the leading ’+’. For example France = 33, US = 1, UK = 44. |
| national_number | string | ✅ Yes | varchar(255); NOT NULL | — | The national (subscriber) portion of the phone number, without the country code prefix and without leading zeros stripped. Stored as a string to preserve leading zeros for countries that require them. |
| e164_number | string | ✅ Yes | varchar(255); NOT NULL | — | The fully-qualified E.164 representation of the number, including the leading ’+’ and country code. This is the canonical machine-readable form used for display, deduplication, and connector sync matching. |
| created_at | datetime, 🔒 system | ✅ Yes | NOT NULL; set once on INSERT via onCreate lifecycle hook | — | Timestamp at which the Phone row was created. Immutable after creation. |
| updated_at | datetime, 🔒 system | ⚪ No | nullable; set on INSERT and updated on every UPDATE via onUpdate lifecycle hook | — | Timestamp of the last modification to the Phone row. Null if the row has never been updated after creation. |
| deleted_at | datetime | ⚪ No | nullable; null = active record | — | Soft-delete timestamp. When set, the phone number is considered deleted and all queries must filter deleted_at IS NULL. Hard-deletes are not used. |