export interface OfferModel {
    ID: number;
    Title: string;
    Description: string;
    IsActive: boolean;
    CreatedBy: number;
    UpdatedBy: number;
    CreatedOn: string;
    UpdatedOn: string;
    deleted_at: string | null;
    affiliates: Affiliate[];
    offer_affiliates: OfferAffiliate[];
    total_affiliates: number;
    total_clients: number;
    total_domains: number;
    PauseBy: number;
    paused_by_user: string | null;
}

// ---------------------- Affiliate ----------------------
export interface Affiliate {
    ID: number;
    Name: string;
    Email: string;
    Address1: string;
    Address2: string;
    City: string;
    State: string;
    Zip: string;
    IsActive: boolean;
    CreatedBy: number;
    UpdatedBy: number;
    CreatedOn: string;
    UpdatedOn: string;
    deleted_at: string | null;
    pivot: AffiliatePivot;
    offer_affiliates: OfferAffiliateWithClient[];
}

export interface AffiliatePivot {
    OfferID: number;
    AffiliateID: number;
}

// ---------------------- Offer Affiliate ----------------------
export interface OfferAffiliate {
    ID: number;
    AffiliateID: number;
    OfferID: number;
    ClientID: number;
    FilteredDomainID: number;
    BaseURL: string;
    Headers: string;
    SendInterval: number;
    LastSentLeadID: number | null;
    IsLive: boolean;
    StaticParameters: string;
    ExcludedStates: string;
    ExcludedDomains: string | null;
    AllowedDomains: string | null;
    MaxPerDay: number;
    AlreadySentForToday: number;
    Weight: number;
    Notes: string;
    GroupName: string;
    filtered_domain: any;
    deleted_at: string | null;
}

// ---------------------- Offer Affiliate (With Client) ----------------------
export interface OfferAffiliateWithClient extends OfferAffiliate {
    client: Client;
}

// ---------------------- Client ----------------------
export interface Client {
    ID: number;
    Name: string;
    Email: string;
    BasePingURL: string | null;
    StaticParams: string | null;
    ClientClassName: string;
    IsActive: boolean;
    CreatedBy: number;
    UpdatedBy: number;
    CreatedOn: string;
    UpdatedOn: string;
    deleted_at: string | null;
    Capping: string | null;
}
