User
The user model represents individuals registered on the Batchmates platform. Users can be donors, institution admins, committee members, or system administrators. Below, we outline the different properties associated with a user.
Properties
- Name
id- Type
- integer
- Description
Unique identifier for the user
- Name
institution_id- Type
- integer | null
- Description
Foreign key to the associated institution. Nullable for donors without institution affiliation.
- Name
first_name- Type
- string
- Description
User's first name
- Name
last_name- Type
- string
- Description
User's last name
- Name
email- Type
- string
- Description
Unique email address for authentication
- Name
email_verified_at- Type
- timestamp | null
- Description
Email verification timestamp
- Name
phone- Type
- string | null
- Description
Contact phone number
- Name
bio- Type
- text | null
- Description
User biography or description
- Name
avatar- Type
- string | null
- Description
URL to user's avatar image
- Name
address- Type
- string | null
- Description
Street address
- Name
city- Type
- string | null
- Description
City name
- Name
country- Type
- string
- Description
Country name (default: "Philippines")
- Name
date_of_birth- Type
- date | null
- Description
User's birth date
- Name
gender- Type
- enum | null
- Description
Gender:
male,female,other,prefer_not_to_say
- Name
status- Type
- enum
- Description
Account status:
active,suspended,pending
- Name
device_token- Type
- string | null
- Description
FCM token for push notifications
- Name
token_version- Type
- integer
- Description
JWT token version for invalidation (default: 1)
- Name
last_login_at- Type
- timestamp | null
- Description
Last login timestamp
- Name
created_at- Type
- timestamp
- Description
Record creation timestamp
- Name
updated_at- Type
- timestamp
- Description
Record last update timestamp
- Name
deleted_at- Type
- timestamp | null
- Description
Soft delete timestamp
Relationships
- Name
institution- Type
- Institution | null
- Description
The institution the user belongs to. See Institution
- Name
donations- Type
- Donation[]
- Description
List of donations made by the user. See Donations
- Name
paymentMethods- Type
- PaymentMethod[]
- Description
Saved payment methods. See Payment Methods
- Name
donationSubscriptions- Type
- DonationSubscription[]
- Description
Active recurring donations. See Subscriptions
- Name
createdCampaigns- Type
- Campaign[]
- Description
Campaigns created by the user. See Campaigns