package service // DonationLevel represents the level of a donation (e.g., Bronze, Silver, Gold) type DonationLevel string const ( DonationLevelBronze DonationLevel = "Bronze" DonationLevelSilver DonationLevel = "Silver" DonationLevelGold DonationLevel = "Gold" ) // Donation represents a donation made to a campaign type Donation struct { ID DonationID `json:"id"` UserID UserID `json:"user_id"` // Foreign Key to User service CampaignID CampaignID `json:"campaign_id"` // Foreign Key to Campaign Amount float64 `json:"amount"` // Using float64 for decimal, consider a dedicated decimal type PointsEarned int `json:"points_earned"` // امتیازی که از این تراکنش خاص کسب شده TransactionID TransactionID `json:"transaction_id"` // Foreign Key to Transaction service CreatedAt time.Time `json:"created_at"` DonationLevel *DonationLevel `json:"donation_level,omitempty"` // Pointer to DonationLevel, allows nil. omitempty hides if nil. }