#!/usr/bin/env python
# encoding: utf-8

from peewee import *
from affiliate.model.config import mysql_report
import time

reportDb = MySQLDatabase(mysql_report['name'],
                         host=mysql_report['host'],
                         port=int(mysql_report['port']),
                         user=mysql_report['user'],
                         passwd=mysql_report['passwd']
                         )


class BaseModel(Model):
    """A base model that will use our MySQL database"""

    class Meta:
        database = reportDb


class AdStatisLog0(BaseModel):
    UserID = CharField(null=False, default=0)
    CampaignID = CharField(null=False, default=0)
    CampaignName = CharField(max_length=256, null=True, default='')
    FlowID = CharField(null=True, default=0)
    FlowName = CharField(max_length=256, null=True, default='')
    LanderID = CharField(null=True, default=0)
    LanderName = CharField(max_length=256, null=True, default='')
    OfferID = CharField(null=True, default=0)
    OfferName = CharField(max_length=256, null=True, default='')
    OfferUrl = CharField(max_length=256, null=True, default='')
    OfferCountry = CharField(max_length=256, null=True, default='')
    AffiliateNetworkID = CharField(null=True, default=0)
    AffilliateNetworkName = CharField(max_length=256, null=True, default='')
    TrafficSourceID = CharField(null=True, default=0)
    TrafficSourceName = CharField(max_length=256, null=True, default='')
    Language = CharField(max_length=256, null=True, default='')
    Model = CharField(max_length=256, null=True, default='')
    Country = CharField(max_length=256, null=True, default='')
    City = CharField(max_length=256, null=True, default='')
    Region = CharField(max_length=256, null=True, default='')
    ISP = CharField(max_length=256, null=True, default='')
    MobileCarrier = CharField(max_length=256, null=True, default='')
    Domain = CharField(max_length=256, null=True, default='')
    DeviceType = CharField(max_length=256, null=True, default='')
    Brand = CharField(max_length=256, null=True, default='')
    OS = CharField(max_length=256, null=True, default='')
    OSVersion = CharField(max_length=256, null=True, default='')
    Browser = CharField(max_length=256, null=True, default='')
    BrowserVersion = CharField(max_length=256, null=True, default='')
    ConnectionType = CharField(max_length=256, null=True, default='')
    Timestamp = CharField(null=True, default=0)
    Visits = CharField(null=True, default=0)
    Clicks = CharField(null=True, default=0)
    Conversions = CharField(null=True, default=0)
    Cost = CharField(null=True, default=0)
    Revenue = CharField(null=True, default=0)
    Impressions = CharField(null=True, default=0)
    KeysMD5 = CharField(max_length=256, null=True, default='')
    Ip = CharField(max_length=256, null=True, default='')
    V1 = CharField(max_length=256, null=True, default='')
    V2 = CharField(max_length=256, null=True, default='')
    V3 = CharField(max_length=256, null=True, default='')
    V4 = CharField(max_length=256, null=True, default='')
    V5 = CharField(max_length=256, null=True, default='')
    V6 = CharField(max_length=256, null=True, default='')
    V7 = CharField(max_length=256, null=True, default='')
    V8 = CharField(max_length=256, null=True, default='')
    V9 = CharField(max_length=256, null=True, default='')
    V10 = CharField(max_length=256, null=True, default='')
    tsCampaignId = CharField(max_length=256, null=True, default='')
    tsWebsiteId = CharField(max_length=256, null=True, default='')
    ClickId = CharField(max_length=256, null=True, default='')

    class Meta:
        db_table = "adstatis_new_0"
        index = (('KeysMD5', True))


class AdStatisLog1(BaseModel):
    UserID = CharField(null=False, default=0)
    CampaignID = CharField(null=False, default=0)
    CampaignName = CharField(max_length=256, null=True, default='')
    FlowID = CharField(null=True, default=0)
    FlowName = CharField(max_length=256, null=True, default='')
    LanderID = CharField(null=True, default=0)
    LanderName = CharField(max_length=256, null=True, default='')
    OfferID = CharField(null=True, default=0)
    OfferName = CharField(max_length=256, null=True, default='')
    OfferUrl = CharField(max_length=256, null=True, default='')
    OfferCountry = CharField(max_length=256, null=True, default='')
    AffiliateNetworkID = CharField(null=True, default=0)
    AffilliateNetworkName = CharField(max_length=256, null=True, default='')
    TrafficSourceID = CharField(null=True, default=0)
    TrafficSourceName = CharField(max_length=256, null=True, default='')
    Language = CharField(max_length=256, null=True, default='')
    Model = CharField(max_length=256, null=True, default='')
    Country = CharField(max_length=256, null=True, default='')
    City = CharField(max_length=256, null=True, default='')
    Region = CharField(max_length=256, null=True, default='')
    ISP = CharField(max_length=256, null=True, default='')
    MobileCarrier = CharField(max_length=256, null=True, default='')
    Domain = CharField(max_length=256, null=True, default='')
    DeviceType = CharField(max_length=256, null=True, default='')
    Brand = CharField(max_length=256, null=True, default='')
    OS = CharField(max_length=256, null=True, default='')
    OSVersion = CharField(max_length=256, null=True, default='')
    Browser = CharField(max_length=256, null=True, default='')
    BrowserVersion = CharField(max_length=256, null=True, default='')
    ConnectionType = CharField(max_length=256, null=True, default='')
    Timestamp = CharField(null=True, default=0)
    Visits = CharField(null=True, default=0)
    Clicks = CharField(null=True, default=0)
    Conversions = CharField(null=True, default=0)
    Cost = CharField(null=True, default=0)
    Revenue = CharField(null=True, default=0)
    Impressions = CharField(null=True, default=0)
    KeysMD5 = CharField(max_length=256, null=True, default='')
    Ip = CharField(max_length=256, null=True, default='')
    V1 = CharField(max_length=256, null=True, default='')
    V2 = CharField(max_length=256, null=True, default='')
    V3 = CharField(max_length=256, null=True, default='')
    V4 = CharField(max_length=256, null=True, default='')
    V5 = CharField(max_length=256, null=True, default='')
    V6 = CharField(max_length=256, null=True, default='')
    V7 = CharField(max_length=256, null=True, default='')
    V8 = CharField(max_length=256, null=True, default='')
    V9 = CharField(max_length=256, null=True, default='')
    V10 = CharField(max_length=256, null=True, default='')
    tsCampaignId = CharField(max_length=256, null=True, default='')
    tsWebsiteId = CharField(max_length=256, null=True, default='')
    ClickId = CharField(max_length=256, null=True, default='')

    class Meta:
        db_table = "adstatis_new_1"
        index = (('KeysMD5', True))


class AdStatisLog2(BaseModel):
    UserID = CharField(null=False, default=0)
    CampaignID = CharField(null=False, default=0)
    CampaignName = CharField(max_length=256, null=True, default='')
    FlowID = CharField(null=True, default=0)
    FlowName = CharField(max_length=256, null=True, default='')
    LanderID = CharField(null=True, default=0)
    LanderName = CharField(max_length=256, null=True, default='')
    OfferID = CharField(null=True, default=0)
    OfferName = CharField(max_length=256, null=True, default='')
    OfferUrl = CharField(max_length=256, null=True, default='')
    OfferCountry = CharField(max_length=256, null=True, default='')
    AffiliateNetworkID = CharField(null=True, default=0)
    AffilliateNetworkName = CharField(max_length=256, null=True, default='')
    TrafficSourceID = CharField(null=True, default=0)
    TrafficSourceName = CharField(max_length=256, null=True, default='')
    Language = CharField(max_length=256, null=True, default='')
    Model = CharField(max_length=256, null=True, default='')
    Country = CharField(max_length=256, null=True, default='')
    City = CharField(max_length=256, null=True, default='')
    Region = CharField(max_length=256, null=True, default='')
    ISP = CharField(max_length=256, null=True, default='')
    MobileCarrier = CharField(max_length=256, null=True, default='')
    Domain = CharField(max_length=256, null=True, default='')
    DeviceType = CharField(max_length=256, null=True, default='')
    Brand = CharField(max_length=256, null=True, default='')
    OS = CharField(max_length=256, null=True, default='')
    OSVersion = CharField(max_length=256, null=True, default='')
    Browser = CharField(max_length=256, null=True, default='')
    BrowserVersion = CharField(max_length=256, null=True, default='')
    ConnectionType = CharField(max_length=256, null=True, default='')
    Timestamp = CharField(null=True, default=0)
    Visits = CharField(null=True, default=0)
    Clicks = CharField(null=True, default=0)
    Conversions = CharField(null=True, default=0)
    Cost = CharField(null=True, default=0)
    Revenue = CharField(null=True, default=0)
    Impressions = CharField(null=True, default=0)
    KeysMD5 = CharField(max_length=256, null=True, default='')
    Ip = CharField(max_length=256, null=True, default='')
    V1 = CharField(max_length=256, null=True, default='')
    V2 = CharField(max_length=256, null=True, default='')
    V3 = CharField(max_length=256, null=True, default='')
    V4 = CharField(max_length=256, null=True, default='')
    V5 = CharField(max_length=256, null=True, default='')
    V6 = CharField(max_length=256, null=True, default='')
    V7 = CharField(max_length=256, null=True, default='')
    V8 = CharField(max_length=256, null=True, default='')
    V9 = CharField(max_length=256, null=True, default='')
    V10 = CharField(max_length=256, null=True, default='')
    tsCampaignId = CharField(max_length=256, null=True, default='')
    tsWebsiteId = CharField(max_length=256, null=True, default='')
    ClickId = CharField(max_length=256, null=True, default='')

    class Meta:
        db_table = "adstatis_new_2"
        index = (('KeysMD5', True))


class AdStatisLog3(BaseModel):
    UserID = CharField(null=False, default=0)
    CampaignID = CharField(null=False, default=0)
    CampaignName = CharField(max_length=256, null=True, default='')
    FlowID = CharField(null=True, default=0)
    FlowName = CharField(max_length=256, null=True, default='')
    LanderID = CharField(null=True, default=0)
    LanderName = CharField(max_length=256, null=True, default='')
    OfferID = CharField(null=True, default=0)
    OfferName = CharField(max_length=256, null=True, default='')
    OfferUrl = CharField(max_length=256, null=True, default='')
    OfferCountry = CharField(max_length=256, null=True, default='')
    AffiliateNetworkID = CharField(null=True, default=0)
    AffilliateNetworkName = CharField(max_length=256, null=True, default='')
    TrafficSourceID = CharField(null=True, default=0)
    TrafficSourceName = CharField(max_length=256, null=True, default='')
    Language = CharField(max_length=256, null=True, default='')
    Model = CharField(max_length=256, null=True, default='')
    Country = CharField(max_length=256, null=True, default='')
    City = CharField(max_length=256, null=True, default='')
    Region = CharField(max_length=256, null=True, default='')
    ISP = CharField(max_length=256, null=True, default='')
    MobileCarrier = CharField(max_length=256, null=True, default='')
    Domain = CharField(max_length=256, null=True, default='')
    DeviceType = CharField(max_length=256, null=True, default='')
    Brand = CharField(max_length=256, null=True, default='')
    OS = CharField(max_length=256, null=True, default='')
    OSVersion = CharField(max_length=256, null=True, default='')
    Browser = CharField(max_length=256, null=True, default='')
    BrowserVersion = CharField(max_length=256, null=True, default='')
    ConnectionType = CharField(max_length=256, null=True, default='')
    Timestamp = CharField(null=True, default=0)
    Visits = CharField(null=True, default=0)
    Clicks = CharField(null=True, default=0)
    Conversions = CharField(null=True, default=0)
    Cost = CharField(null=True, default=0)
    Revenue = CharField(null=True, default=0)
    Impressions = CharField(null=True, default=0)
    KeysMD5 = CharField(max_length=256, null=True, default='')
    Ip = CharField(max_length=256, null=True, default='')
    V1 = CharField(max_length=256, null=True, default='')
    V2 = CharField(max_length=256, null=True, default='')
    V3 = CharField(max_length=256, null=True, default='')
    V4 = CharField(max_length=256, null=True, default='')
    V5 = CharField(max_length=256, null=True, default='')
    V6 = CharField(max_length=256, null=True, default='')
    V7 = CharField(max_length=256, null=True, default='')
    V8 = CharField(max_length=256, null=True, default='')
    V9 = CharField(max_length=256, null=True, default='')
    V10 = CharField(max_length=256, null=True, default='')
    tsCampaignId = CharField(max_length=256, null=True, default='')
    tsWebsiteId = CharField(max_length=256, null=True, default='')
    ClickId = CharField(max_length=256, null=True, default='')

    class Meta:
        db_table = "adstatis_new_3"
        index = (('KeysMD5', True))


class AdStatisLog4(BaseModel):
    UserID = CharField(null=False, default=0)
    CampaignID = CharField(null=False, default=0)
    CampaignName = CharField(max_length=256, null=True, default='')
    FlowID = CharField(null=True, default=0)
    FlowName = CharField(max_length=256, null=True, default='')
    LanderID = CharField(null=True, default=0)
    LanderName = CharField(max_length=256, null=True, default='')
    OfferID = CharField(null=True, default=0)
    OfferName = CharField(max_length=256, null=True, default='')
    OfferUrl = CharField(max_length=256, null=True, default='')
    OfferCountry = CharField(max_length=256, null=True, default='')
    AffiliateNetworkID = CharField(null=True, default=0)
    AffilliateNetworkName = CharField(max_length=256, null=True, default='')
    TrafficSourceID = CharField(null=True, default=0)
    TrafficSourceName = CharField(max_length=256, null=True, default='')
    Language = CharField(max_length=256, null=True, default='')
    Model = CharField(max_length=256, null=True, default='')
    Country = CharField(max_length=256, null=True, default='')
    City = CharField(max_length=256, null=True, default='')
    Region = CharField(max_length=256, null=True, default='')
    ISP = CharField(max_length=256, null=True, default='')
    MobileCarrier = CharField(max_length=256, null=True, default='')
    Domain = CharField(max_length=256, null=True, default='')
    DeviceType = CharField(max_length=256, null=True, default='')
    Brand = CharField(max_length=256, null=True, default='')
    OS = CharField(max_length=256, null=True, default='')
    OSVersion = CharField(max_length=256, null=True, default='')
    Browser = CharField(max_length=256, null=True, default='')
    BrowserVersion = CharField(max_length=256, null=True, default='')
    ConnectionType = CharField(max_length=256, null=True, default='')
    Timestamp = CharField(null=True, default=0)
    Visits = CharField(null=True, default=0)
    Clicks = CharField(null=True, default=0)
    Conversions = CharField(null=True, default=0)
    Cost = CharField(null=True, default=0)
    Revenue = CharField(null=True, default=0)
    Impressions = CharField(null=True, default=0)
    KeysMD5 = CharField(max_length=256, null=True, default='')
    Ip = CharField(max_length=256, null=True, default='')
    V1 = CharField(max_length=256, null=True, default='')
    V2 = CharField(max_length=256, null=True, default='')
    V3 = CharField(max_length=256, null=True, default='')
    V4 = CharField(max_length=256, null=True, default='')
    V5 = CharField(max_length=256, null=True, default='')
    V6 = CharField(max_length=256, null=True, default='')
    V7 = CharField(max_length=256, null=True, default='')
    V8 = CharField(max_length=256, null=True, default='')
    V9 = CharField(max_length=256, null=True, default='')
    V10 = CharField(max_length=256, null=True, default='')
    tsCampaignId = CharField(max_length=256, null=True, default='')
    tsWebsiteId = CharField(max_length=256, null=True, default='')
    ClickId = CharField(max_length=256, null=True, default='')

    class Meta:
        db_table = "adstatis_new_4"
        index = (('KeysMD5', True))


class AdStatisLog5(BaseModel):
    UserID = CharField(null=False, default=0)
    CampaignID = CharField(null=False, default=0)
    CampaignName = CharField(max_length=256, null=True, default='')
    FlowID = CharField(null=True, default=0)
    FlowName = CharField(max_length=256, null=True, default='')
    LanderID = CharField(null=True, default=0)
    LanderName = CharField(max_length=256, null=True, default='')
    OfferID = CharField(null=True, default=0)
    OfferName = CharField(max_length=256, null=True, default='')
    OfferUrl = CharField(max_length=256, null=True, default='')
    OfferCountry = CharField(max_length=256, null=True, default='')
    AffiliateNetworkID = CharField(null=True, default=0)
    AffilliateNetworkName = CharField(max_length=256, null=True, default='')
    TrafficSourceID = CharField(null=True, default=0)
    TrafficSourceName = CharField(max_length=256, null=True, default='')
    Language = CharField(max_length=256, null=True, default='')
    Model = CharField(max_length=256, null=True, default='')
    Country = CharField(max_length=256, null=True, default='')
    City = CharField(max_length=256, null=True, default='')
    Region = CharField(max_length=256, null=True, default='')
    ISP = CharField(max_length=256, null=True, default='')
    MobileCarrier = CharField(max_length=256, null=True, default='')
    Domain = CharField(max_length=256, null=True, default='')
    DeviceType = CharField(max_length=256, null=True, default='')
    Brand = CharField(max_length=256, null=True, default='')
    OS = CharField(max_length=256, null=True, default='')
    OSVersion = CharField(max_length=256, null=True, default='')
    Browser = CharField(max_length=256, null=True, default='')
    BrowserVersion = CharField(max_length=256, null=True, default='')
    ConnectionType = CharField(max_length=256, null=True, default='')
    Timestamp = CharField(null=True, default=0)
    Visits = CharField(null=True, default=0)
    Clicks = CharField(null=True, default=0)
    Conversions = CharField(null=True, default=0)
    Cost = CharField(null=True, default=0)
    Revenue = CharField(null=True, default=0)
    Impressions = CharField(null=True, default=0)
    KeysMD5 = CharField(max_length=256, null=True, default='')
    Ip = CharField(max_length=256, null=True, default='')
    V1 = CharField(max_length=256, null=True, default='')
    V2 = CharField(max_length=256, null=True, default='')
    V3 = CharField(max_length=256, null=True, default='')
    V4 = CharField(max_length=256, null=True, default='')
    V5 = CharField(max_length=256, null=True, default='')
    V6 = CharField(max_length=256, null=True, default='')
    V7 = CharField(max_length=256, null=True, default='')
    V8 = CharField(max_length=256, null=True, default='')
    V9 = CharField(max_length=256, null=True, default='')
    V10 = CharField(max_length=256, null=True, default='')
    tsCampaignId = CharField(max_length=256, null=True, default='')
    tsWebsiteId = CharField(max_length=256, null=True, default='')
    ClickId = CharField(max_length=256, null=True, default='')

    class Meta:
        db_table = "adstatis_new_5"
        index = (('KeysMD5', True))


class AdStatisLog6(BaseModel):
    UserID = CharField(null=False, default=0)
    CampaignID = CharField(null=False, default=0)
    CampaignName = CharField(max_length=256, null=True, default='')
    FlowID = CharField(null=True, default=0)
    FlowName = CharField(max_length=256, null=True, default='')
    LanderID = CharField(null=True, default=0)
    LanderName = CharField(max_length=256, null=True, default='')
    OfferID = CharField(null=True, default=0)
    OfferName = CharField(max_length=256, null=True, default='')
    OfferUrl = CharField(max_length=256, null=True, default='')
    OfferCountry = CharField(max_length=256, null=True, default='')
    AffiliateNetworkID = CharField(null=True, default=0)
    AffilliateNetworkName = CharField(max_length=256, null=True, default='')
    TrafficSourceID = CharField(null=True, default=0)
    TrafficSourceName = CharField(max_length=256, null=True, default='')
    Language = CharField(max_length=256, null=True, default='')
    Model = CharField(max_length=256, null=True, default='')
    Country = CharField(max_length=256, null=True, default='')
    City = CharField(max_length=256, null=True, default='')
    Region = CharField(max_length=256, null=True, default='')
    ISP = CharField(max_length=256, null=True, default='')
    MobileCarrier = CharField(max_length=256, null=True, default='')
    Domain = CharField(max_length=256, null=True, default='')
    DeviceType = CharField(max_length=256, null=True, default='')
    Brand = CharField(max_length=256, null=True, default='')
    OS = CharField(max_length=256, null=True, default='')
    OSVersion = CharField(max_length=256, null=True, default='')
    Browser = CharField(max_length=256, null=True, default='')
    BrowserVersion = CharField(max_length=256, null=True, default='')
    ConnectionType = CharField(max_length=256, null=True, default='')
    Timestamp = CharField(null=True, default=0)
    Visits = CharField(null=True, default=0)
    Clicks = CharField(null=True, default=0)
    Conversions = CharField(null=True, default=0)
    Cost = CharField(null=True, default=0)
    Revenue = CharField(null=True, default=0)
    Impressions = CharField(null=True, default=0)
    KeysMD5 = CharField(max_length=256, null=True, default='')
    Ip = CharField(max_length=256, null=True, default='')
    V1 = CharField(max_length=256, null=True, default='')
    V2 = CharField(max_length=256, null=True, default='')
    V3 = CharField(max_length=256, null=True, default='')
    V4 = CharField(max_length=256, null=True, default='')
    V5 = CharField(max_length=256, null=True, default='')
    V6 = CharField(max_length=256, null=True, default='')
    V7 = CharField(max_length=256, null=True, default='')
    V8 = CharField(max_length=256, null=True, default='')
    V9 = CharField(max_length=256, null=True, default='')
    V10 = CharField(max_length=256, null=True, default='')
    tsCampaignId = CharField(max_length=256, null=True, default='')
    tsWebsiteId = CharField(max_length=256, null=True, default='')
    ClickId = CharField(max_length=256, null=True, default='')

    class Meta:
        db_table = "adstatis_new_6"
        index = (('KeysMD5', True))


class AdStatisLog7(BaseModel):
    UserID = CharField(null=False, default=0)
    CampaignID = CharField(null=False, default=0)
    CampaignName = CharField(max_length=256, null=True, default='')
    FlowID = CharField(null=True, default=0)
    FlowName = CharField(max_length=256, null=True, default='')
    LanderID = CharField(null=True, default=0)
    LanderName = CharField(max_length=256, null=True, default='')
    OfferID = CharField(null=True, default=0)
    OfferName = CharField(max_length=256, null=True, default='')
    OfferUrl = CharField(max_length=256, null=True, default='')
    OfferCountry = CharField(max_length=256, null=True, default='')
    AffiliateNetworkID = CharField(null=True, default=0)
    AffilliateNetworkName = CharField(max_length=256, null=True, default='')
    TrafficSourceID = CharField(null=True, default=0)
    TrafficSourceName = CharField(max_length=256, null=True, default='')
    Language = CharField(max_length=256, null=True, default='')
    Model = CharField(max_length=256, null=True, default='')
    Country = CharField(max_length=256, null=True, default='')
    City = CharField(max_length=256, null=True, default='')
    Region = CharField(max_length=256, null=True, default='')
    ISP = CharField(max_length=256, null=True, default='')
    MobileCarrier = CharField(max_length=256, null=True, default='')
    Domain = CharField(max_length=256, null=True, default='')
    DeviceType = CharField(max_length=256, null=True, default='')
    Brand = CharField(max_length=256, null=True, default='')
    OS = CharField(max_length=256, null=True, default='')
    OSVersion = CharField(max_length=256, null=True, default='')
    Browser = CharField(max_length=256, null=True, default='')
    BrowserVersion = CharField(max_length=256, null=True, default='')
    ConnectionType = CharField(max_length=256, null=True, default='')
    Timestamp = CharField(null=True, default=0)
    Visits = CharField(null=True, default=0)
    Clicks = CharField(null=True, default=0)
    Conversions = CharField(null=True, default=0)
    Cost = CharField(null=True, default=0)
    Revenue = CharField(null=True, default=0)
    Impressions = CharField(null=True, default=0)
    KeysMD5 = CharField(max_length=256, null=True, default='')
    Ip = CharField(max_length=256, null=True, default='')
    V1 = CharField(max_length=256, null=True, default='')
    V2 = CharField(max_length=256, null=True, default='')
    V3 = CharField(max_length=256, null=True, default='')
    V4 = CharField(max_length=256, null=True, default='')
    V5 = CharField(max_length=256, null=True, default='')
    V6 = CharField(max_length=256, null=True, default='')
    V7 = CharField(max_length=256, null=True, default='')
    V8 = CharField(max_length=256, null=True, default='')
    V9 = CharField(max_length=256, null=True, default='')
    V10 = CharField(max_length=256, null=True, default='')
    tsCampaignId = CharField(max_length=256, null=True, default='')
    tsWebsiteId = CharField(max_length=256, null=True, default='')
    ClickId = CharField(max_length=256, null=True, default='')

    class Meta:
        db_table = "adstatis_new_7"
        index = (('KeysMD5', True))


class AdStatisLog8(BaseModel):
    UserID = CharField(null=False, default=0)
    CampaignID = CharField(null=False, default=0)
    CampaignName = CharField(max_length=256, null=True, default='')
    FlowID = CharField(null=True, default=0)
    FlowName = CharField(max_length=256, null=True, default='')
    LanderID = CharField(null=True, default=0)
    LanderName = CharField(max_length=256, null=True, default='')
    OfferID = CharField(null=True, default=0)
    OfferName = CharField(max_length=256, null=True, default='')
    OfferUrl = CharField(max_length=256, null=True, default='')
    OfferCountry = CharField(max_length=256, null=True, default='')
    AffiliateNetworkID = CharField(null=True, default=0)
    AffilliateNetworkName = CharField(max_length=256, null=True, default='')
    TrafficSourceID = CharField(null=True, default=0)
    TrafficSourceName = CharField(max_length=256, null=True, default='')
    Language = CharField(max_length=256, null=True, default='')
    Model = CharField(max_length=256, null=True, default='')
    Country = CharField(max_length=256, null=True, default='')
    City = CharField(max_length=256, null=True, default='')
    Region = CharField(max_length=256, null=True, default='')
    ISP = CharField(max_length=256, null=True, default='')
    MobileCarrier = CharField(max_length=256, null=True, default='')
    Domain = CharField(max_length=256, null=True, default='')
    DeviceType = CharField(max_length=256, null=True, default='')
    Brand = CharField(max_length=256, null=True, default='')
    OS = CharField(max_length=256, null=True, default='')
    OSVersion = CharField(max_length=256, null=True, default='')
    Browser = CharField(max_length=256, null=True, default='')
    BrowserVersion = CharField(max_length=256, null=True, default='')
    ConnectionType = CharField(max_length=256, null=True, default='')
    Timestamp = CharField(null=True, default=0)
    Visits = CharField(null=True, default=0)
    Clicks = CharField(null=True, default=0)
    Conversions = CharField(null=True, default=0)
    Cost = CharField(null=True, default=0)
    Revenue = CharField(null=True, default=0)
    Impressions = CharField(null=True, default=0)
    KeysMD5 = CharField(max_length=256, null=True, default='')
    Ip = CharField(max_length=256, null=True, default='')
    V1 = CharField(max_length=256, null=True, default='')
    V2 = CharField(max_length=256, null=True, default='')
    V3 = CharField(max_length=256, null=True, default='')
    V4 = CharField(max_length=256, null=True, default='')
    V5 = CharField(max_length=256, null=True, default='')
    V6 = CharField(max_length=256, null=True, default='')
    V7 = CharField(max_length=256, null=True, default='')
    V8 = CharField(max_length=256, null=True, default='')
    V9 = CharField(max_length=256, null=True, default='')
    V10 = CharField(max_length=256, null=True, default='')
    tsCampaignId = CharField(max_length=256, null=True, default='')
    tsWebsiteId = CharField(max_length=256, null=True, default='')
    ClickId = CharField(max_length=256, null=True, default='')

    class Meta:
        db_table = "adstatis_new_8"
        index = (('KeysMD5', True))


class AdStatisLog9(BaseModel):
    UserID = CharField(null=False, default=0)
    CampaignID = CharField(null=False, default=0)
    CampaignName = CharField(max_length=256, null=True, default='')
    FlowID = CharField(null=True, default=0)
    FlowName = CharField(max_length=256, null=True, default='')
    LanderID = CharField(null=True, default=0)
    LanderName = CharField(max_length=256, null=True, default='')
    OfferID = CharField(null=True, default=0)
    OfferName = CharField(max_length=256, null=True, default='')
    OfferUrl = CharField(max_length=256, null=True, default='')
    OfferCountry = CharField(max_length=256, null=True, default='')
    AffiliateNetworkID = CharField(null=True, default=0)
    AffilliateNetworkName = CharField(max_length=256, null=True, default='')
    TrafficSourceID = CharField(null=True, default=0)
    TrafficSourceName = CharField(max_length=256, null=True, default='')
    Language = CharField(max_length=256, null=True, default='')
    Model = CharField(max_length=256, null=True, default='')
    Country = CharField(max_length=256, null=True, default='')
    City = CharField(max_length=256, null=True, default='')
    Region = CharField(max_length=256, null=True, default='')
    ISP = CharField(max_length=256, null=True, default='')
    MobileCarrier = CharField(max_length=256, null=True, default='')
    Domain = CharField(max_length=256, null=True, default='')
    DeviceType = CharField(max_length=256, null=True, default='')
    Brand = CharField(max_length=256, null=True, default='')
    OS = CharField(max_length=256, null=True, default='')
    OSVersion = CharField(max_length=256, null=True, default='')
    Browser = CharField(max_length=256, null=True, default='')
    BrowserVersion = CharField(max_length=256, null=True, default='')
    ConnectionType = CharField(max_length=256, null=True, default='')
    Timestamp = CharField(null=True, default=0)
    Visits = CharField(null=True, default=0)
    Clicks = CharField(null=True, default=0)
    Conversions = CharField(null=True, default=0)
    Cost = CharField(null=True, default=0)
    Revenue = CharField(null=True, default=0)
    Impressions = CharField(null=True, default=0)
    KeysMD5 = CharField(max_length=256, null=True, default='')
    Ip = CharField(max_length=256, null=True, default='')
    V1 = CharField(max_length=256, null=True, default='')
    V2 = CharField(max_length=256, null=True, default='')
    V3 = CharField(max_length=256, null=True, default='')
    V4 = CharField(max_length=256, null=True, default='')
    V5 = CharField(max_length=256, null=True, default='')
    V6 = CharField(max_length=256, null=True, default='')
    V7 = CharField(max_length=256, null=True, default='')
    V8 = CharField(max_length=256, null=True, default='')
    V9 = CharField(max_length=256, null=True, default='')
    V10 = CharField(max_length=256, null=True, default='')
    tsCampaignId = CharField(max_length=256, null=True, default='')
    tsWebsiteId = CharField(max_length=256, null=True, default='')
    ClickId = CharField(max_length=256, null=True, default='')

    class Meta:
        db_table = "adstatis_new_9"
        index = (('KeysMD5', True))


class TotalInfo(BaseModel):
    id = IntegerField(null=False)
    userid = IntegerField(null=False)

    class Meta:
        db_table = "total_info"


reportDb.connect()

# a = Country.update(name='ccc').where(Country.id == 1).execute()
# pass
