Campaign
The campaign model represents fundraising initiatives created to support educational institutions or individual scholars. Campaigns can be general (supporting multiple scholars or causes) or individual (supporting a specific scholar). Below, we outline the different properties associated with a campaign.
Properties
- Name
id- Type
- integer
- Description
Unique identifier for the campaign
- Name
institution_id- Type
- integer
- Description
Foreign key to the institution this campaign belongs to
- Name
created_by- Type
- integer
- Description
Foreign key to the user who created this campaign
- Name
title- Type
- string
- Description
Campaign title
- Name
description- Type
- text
- Description
Detailed campaign description
- Name
image- Type
- string | null
- Description
URL to campaign cover image
- Name
goal_amount- Type
- decimal
- Description
Target fundraising amount in PHP
- Name
raised_amount- Type
- decimal
- Description
Total amount raised so far
- Name
available_amount- Type
- decimal
- Description
Amount available for withdrawal
- Name
campaign_type- Type
- enum
- Description
Campaign type:
general,individual
- Name
status- Type
- enum
- Description
Campaign status:
pending_review,active,completed,rejected,closed
- Name
priority- Type
- enum
- Description
Campaign priority:
normal,urgent
- Name
end_date- Type
- date | null
- Description
Campaign end date
- Name
allow_recurring- Type
- boolean
- Description
Whether recurring donations are enabled
- Name
min_recurring_amount- Type
- decimal | null
- Description
Minimum amount for recurring donations
- Name
suggested_amounts- Type
- array | null
- Description
Array of suggested donation amounts
- Name
supporter_count- Type
- integer
- Description
Number of unique supporters
- Name
share_count- Type
- integer
- Description
Number of times campaign was shared
- Name
approved_by- Type
- integer | null
- Description
Foreign key to user who approved the campaign
- Name
approved_at- Type
- timestamp | null
- Description
Campaign approval timestamp
- Name
rejection_reason- Type
- text | null
- Description
Reason for rejection if status is rejected
- Name
created_at- Type
- timestamp
- Description
Record creation timestamp
- Name
updated_at- Type
- timestamp
- Description
Record last update timestamp
Computed Properties
- Name
days_left- Type
- integer | null
- Description
Days remaining until end_date
- Name
progress_percentage- Type
- float
- Description
Campaign progress: (raised_amount / goal_amount) × 100
Relationships
- Name
institution- Type
- Institution
- Description
The institution this campaign belongs to. See Institutions
- Name
creator- Type
- User
- Description
The user who created this campaign. See Users
- Name
donations- Type
- Donation[]
- Description
All donations made to this campaign. See Donations
- Name
scholars- Type
- Scholar[]
- Description
Scholars associated with this campaign. See Scholars
- Name
subscriptions- Type
- DonationSubscription[]
- Description
Active recurring donation subscriptions. See Subscriptions