User Model
This document describes the User model, as defined in the Go codebase. The User model represents user data, including personal information, contact details, and relevant timestamps. It is primarily used for sending user information via webhooks.
Structure
type User struct {
ID uuid.UUID `json:"id"`
FirstName *string `json:"first_name"`
MiddleName *string `json:"middle_name"`
LastName *string `json:"last_name"`
Email string `json:"email"`
BirthDate *string `json:"birth_date"`
Telephone *string `json:"telephone"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
CustomerNumber string `json:"customer_number"`
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
ID | uuid.UUID | Unique identifier of the user. |
FirstName | *string | The first name of the user (optional). |
MiddleName | *string | The middle name of the user (optional). |
LastName | *string | The last name of the user (optional). |
Email | string | The email address of the user. |
BirthDate | *string | The birthdate of the user (optional, ISO 8601). |
Telephone | *string | The telephone number of the user (optional). |
CreatedAt | time.Time | The creation timestamp of the user. |
UpdatedAt | time.Time | The update timestamp of the user. |
CustomerNumber | string | The customer number of the user. |
Example JSON
{
"id": "b6e5c8f3-7d4b-4b5a-9e6a-2b8e7c0f3e4c",
"first_name": "Anna",
"middle_name": "van",
"last_name": "Dijk",
"email": "anna.vandijk@example.com",
"birth_date": "1990-04-23",
"telephone": "+31-6-12345678",
"created_at": "2025-05-20T12:00:00Z",
"updated_at": "2025-05-20T12:30:00Z",
"customer_number": "CUST-2025-0001"
}
Notes
- Optional Fields:
FirstName,MiddleName,LastName,BirthDate, andTelephonecan benullin JSON. - Timestamps:
CreatedAtandUpdatedAtare in ISO 8601 format. - UUID: The
IDfield uses Gouuidpackage. - Customer Number: This is a string identifier for the user in the business context.