| 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. |