Software Testing Mutation Operators Example Codes (SKD)Super Keyword Deletion
1. User Model
Represents all users in the system including Admins, Sponsors, and Influencers.
Fields:
-
id: Unique identifier -
username: Login name -
email: User email -
password_hash: Securely stored password (hashed) -
role: User type (admin/sponsor/influencer) -
created_at: Timestamp of account creation
Passwords are stored using secure hashing (e.g., Werkzeug or bcrypt) to prevent exposure in case of a database breach.
2. Campaign Model
Represents sponsorship campaigns created by sponsors.
Fields:
-
id: Unique identifier -
title: Name of the campaign -
description: Campaign details -
category: Niche/category (e.g., tech, fashion) -
budget: Amount sponsor is willing to pay -
status: Status (public/private/flagged) -
sponsor_id: Foreign key linking to User -
created_at: Date created
Only sponsors can create/update/delete campaigns. Admins can moderate them.
3. AdRequest Model
Connects influencers with campaigns by allowing them to send requests.
Fields:
-
id: Unique identifier -
influencer_id: Foreign key linking to User -
campaign_id: Foreign key linking to Campaign -
status: pending/approved/rejected -
message: Optional pitch from influencer -
submitted_at: Date of request
Influencers use this model to apply for campaigns.
4. Rating/Review Model (Optional)
Allows sponsors to rate influencers after a campaign ends.
Fields:
-
id: Unique identifier -
sponsor_id: Foreign key to User -
influencer_id: Foreign key to User -
campaign_id: Foreign key to Campaign -
rating: Score (e.g., 1 to 5) -
review: Text review -
created_at: Date of review