Esempio n. 1
0
class World(TableModel):
    __tablename__ = "world"
    _type_info = [
        ("id", Integer32(primary_key=True)),
        ("randomNumber",
         Integer32(sqla_column_args=dict(name="randomnumber"))),
    ]
Esempio n. 2
0
class CardGroup(TableModel):
    __tablename__ = 'cc_card_group'

    id = Integer32(primary_key=True)
    name = Unicode(1)
    description = Unicode
    users_perms = Integer32(default=0)
    id_agent = Integer32(default=0)
Esempio n. 3
0
class Logrefill(TableModel):
    __tablename__ = 'cc_logrefill'

    id = Integer64(primary_key=True)
    # card = ForeignKeyField(Card, db_column='card_id')
    card = Integer64(db_column='card_id')
    date = Date
    agent = Integer64(db_column='agent_id')
    credit = Decimal(default=0.0)
    description = Unicode
    # refill_type (amount:0, correction:1, extra fee:2,agent refund:3)
    refill_type = Integer32(default=0)
    added_invoice = Integer32(default=0)
Esempio n. 4
0
class Logpayment(TableModel):
    __tablename__ = 'cc_logpayment'

    id = Integer64(primary_key=True)
    card = Integer64(db_column='card_id')
    date = Date(default_factory=date.today)
    description = Unicode
    payment = Decimal(default=0.0)
    # payment_type (amount:0, correction:1, extra fee:2,agent refund:3)
    payment_type = Integer32(default=0)
    id_logrefill = Integer64
    added_commission = Integer32(default=0)
    added_refill = Integer32(default=0)
    agent = Integer64(db_column='agent_id')
Esempio n. 5
0
class Call(TableModel):
    __tablename__ = 'cc_call'

    id = Integer64(primary_key=True)
    sessionid = Unicode(1, default=0)
    uniqueid = Unicode(1, null=False)
    card_id = Integer64(null=False, db_column='card_id')
    nasipaddress = Unicode(1, null=False)
    starttime = Date(index=True, default_factory=date.today)
    stoptime = Unicode(1, default="0000-00-00 00:00:00")
    buycost = Decimal
    calledstation = Unicode(1, index=True)
    destination = Integer32
    dnid = Unicode(1, null=False)
    id_card_package_offer = Integer32
    id_did = Integer32
    id_ratecard = Integer32
    id_tariffgroup = Integer32
    id_tariffplan = Integer32
    id_trunk = Integer32
    real_sessiontime = Integer32
    sessionbill = Float
    sessiontime = Integer32
    sipiax = Integer32
    src = Unicode(1)
    terminatecauseid = Integer32(index=True)
Esempio n. 6
0
class CallplanLcr(TableModel):
    __tablename__ = 'cc_callplan_lcr'

    id = Integer32(primary_key=True)
    buyrate = Decimal
    connectcharge = Decimal
    destination = Unicode(1)
    dialprefix = Unicode(1)
    id_trunk = Integer32
    idtariffplan = Integer32
    initblock = Integer32
    ratecard = Integer32(db_column='ratecard_id')
    rateinitial = Decimal
    startdate = Date
    stopdate = Date
    tariffgroup = Integer32(db_column='tariffgroup_id')
Esempio n. 7
0
class Timezone(TableModel):
    __tablename__ = 'cc_timezone'

    id = Integer32(primary_key=True)
    gmtoffset = Integer64
    gmttime = Unicode(1)
    gmtzone = Unicode(1)
Esempio n. 8
0
class CardSeria(TableModel):
    __tablename__ = 'cc_card_seria'

    id = Integer32(primary_key=True)
    description = Unicode
    name = Unicode(1)
    value = Integer64
Esempio n. 9
0
class Support(TableModel):
    __tablename__ = 'cc_support'

    id = Integer32(primary_key=True)
    email = Unicode(1)
    language = Unicode(1)
    name = Unicode(1)
Esempio n. 10
0
class CallArchive(TableModel):
    __tablename__ = 'cc_call_archive'

    buycost = Decimal
    calledstation = Unicode(1, index=True)
    card = Integer64(db_column='card_id')
    destination = Integer32
    dnid = Unicode(1)
    id = Integer64(primary_key=True)
    id_card_package_offer = Integer32
    id_did = Integer32
    id_ratecard = Integer32
    id_tariffgroup = Integer32
    id_tariffplan = Integer32
    id_trunk = Integer32
    nasipaddress = Unicode(1)
    real_sessiontime = Integer32
    sessionbill = Float
    sessionid = Unicode(1)
    sessiontime = Integer32
    sipiax = Integer32
    src = Unicode(1)
    starttime = Date(index=True)
    stoptime = Date
    terminatecauseid = Integer32(index=True)
    uniqueid = Unicode(1)
Esempio n. 11
0
class Phonebook(TableModel):
    __tablename__ = 'cc_phonebook'

    id = Integer32(primary_key=True)
    description = Unicode
    id_card = Integer64
    name = Unicode(1)
Esempio n. 12
0
class CampaignConfig(TableModel):
    __tablename__ = 'cc_campaign_config'

    id = Integer32(primary_key=True)
    context = Unicode(1)
    description = Unicode
    flatrate = Decimal
    name = Unicode(1)
Esempio n. 13
0
class CampaignPhonestatus(TableModel):
    __tablename__ = 'cc_campaign_phonestatus'

    id_callback = Unicode(1)
    id_campaign = Integer32(primary_key=True)
    id_phonenumber = Integer64(primary_key=True)
    lastuse = Date
    status = Integer32
Esempio n. 14
0
class SupportComponent(TableModel):
    __tablename__ = 'cc_support_component'

    id = Integer32(primary_key=True)
    activated = Integer32
    id_support = Integer32
    name = Unicode(1)
    type_user = Integer32
Esempio n. 15
0
class MissedCalls(TableModel):
    __tablename__ = 'missed_calls'

    id = Integer32(primary_key=True)
    callid = Unicode(1, index=True)
    cdr = Integer32(db_column='cdr_id')
    dst_domain = Unicode(1)
    dst_ouser = Unicode(1)
    dst_user = Unicode(1)
    from_tag = Unicode(1)
    method = Unicode(1)
    sip_code = Unicode(1)
    sip_reason = Unicode(1)
    src_domain = Unicode(1)
    src_ip = Unicode(1)
    src_user = Unicode(1)
    time = Date
    to_tag = Unicode(1)
Esempio n. 16
0
class Charge(TableModel):
    __tablename__ = 'cc_charge'

    id = Integer64(primary_key=True)
    amount = Float(default=0)
    charged_status = Integer32(default=0)
    # Values: 1:charge DID setup, 2:Montly charge for DID use, 3:Subscription fee, 4:Extra Charge
    chargetype = Integer32(default=4)
    cover_from = Date
    cover_to = Date
    creationdate = Date(index=True, default_factory=date.today)
    description = Unicode
    id_cc_card = Card(db_column='id_cc_card')
    id_cc_card_subscription = Integer64
    # id_cc_did = Integer64
    cc_did = Did.store_as(table(left='id_cc_did'))
    iduser = Integer32(default=0)
    invoiced_status = Integer32(default=0)
Esempio n. 17
0
class Extensions(TableModel):
    __tablename__ = 'cc_extension'

    id = Integer32(primary_key=True)
    context = Unicode(64, default='home')
    exten = Unicode(20, default='')
    priority = Unicode(4, default='0')
    app = Unicode(20, default='Dial')
    appdata = Unicode(128, default='')
Esempio n. 18
0
class Currencies(TableModel):
    __tablename__ = 'cc_currencies'

    id = Integer32(primary_key=True)
    basecurrency = Unicode(1)
    currency = Unicode(1, unique=True)
    lastupdate = Date
    name = Unicode(1)
    value = Decimal
Esempio n. 19
0
class Ratecard(TableModel):
    __tablename__ = 'cc_ratecard'

    id = Integer32(primary_key=True)
    additional_block_charge = Decimal
    additional_block_charge_time = Integer32
    additional_grace = Integer32
    announce_time_correction = Decimal
    billingblock = Integer32
    billingblocka = Integer32
    billingblockb = Integer32
    billingblockc = Integer32
    buyrate = Decimal
    buyrateincrement = Integer32
    buyrateinitblock = Integer32
    chargea = Decimal
    chargeb = Decimal
    chargec = Float
    connectcharge = Decimal
    destination = Integer64
    dialprefix = Unicode(1, index=True)
    disconnectcharge = Decimal
    disconnectcharge_after = Integer32
    endtime = Integer32
    id_outbound_cidgroup = Integer32
    id_trunk = Integer32
    idtariffplan = Integer32(index=True)
    initblock = Integer32
    is_merged = Integer32
    minimal_cost = Decimal
    musiconhold = Unicode(1)
    rateinitial = Decimal
    rounding_calltime = Integer32
    rounding_threshold = Integer32
    startdate = Date
    starttime = Integer32
    stepchargea = Decimal
    stepchargeb = Decimal
    stepchargec = Float
    stopdate = Date
    tag = Unicode(1)
    timechargea = Integer32
    timechargeb = Integer32
    timechargec = Integer32
Esempio n. 20
0
class Configuration(TableModel):
    __tablename__ = 'cc_configuration'

    configuration_description = Unicode(1)
    configuration = Integer32(primary_key=True, db_column='configuration_id')
    configuration_key = Unicode(1)
    configuration_title = Unicode(1)
    configuration_type = Integer32
    configuration_value = Unicode(1)
    set_function = Unicode(1)
    use_function = Unicode(1)
Esempio n. 21
0
class Config(TableModel):
    __tablename__ = 'cc_config'

    id = Integer32(primary_key=True)
    config_description = Unicode(1)
    config_group_title = Unicode(1)
    config_key = Unicode(1)
    config_listvalues = Unicode(1)
    config_title = Unicode(1)
    config_value = Unicode(1)
    config_valuetype = Integer32
Esempio n. 22
0
class Tariffgroup(TableModel):
    __tablename__ = 'cc_tariffgroup'

    id = Integer32(primary_key=True)
    creationdate = Date
    id_cc_package_offer = Integer64
    idtariffplan = Integer32
    iduser = Integer32
    lcrtype = Integer32
    removeinterprefix = Integer32
    tariffgroupname = Unicode(1)
Esempio n. 23
0
class Templatemail(TableModel):
    __tablename__ = 'cc_templatemail'

    id = Integer32(primary_key=True)
    fromemail = Unicode(1)
    fromname = Unicode(1)
    id_language = Unicode(1)
    mailtype = Unicode(1)
    messagehtml = Unicode(1)
    messagetext = Unicode(1)
    subject = Unicode(1)
Esempio n. 24
0
class IaxBuddies(TableModel):
    __tablename__ = 'cc_iax_buddies'

    id = Integer32(primary_key=True)
    defaultip = Unicode(1, db_column='DEFAULTip')
    accountcode = Unicode(1)
    adsi = Unicode(1)
    allow = Unicode(1)
    amaflags = Unicode(1)
    auth = Unicode(1)
    callerid = Unicode(1)
    cid_number = Unicode(1)
    codecpriority = Unicode(1)
    context = Unicode(1)
    dbsecret = Unicode(1)
    deny = Unicode(1)
    disallow = Unicode(1)
    encryption = Unicode(1)
    forcejitterbuffer = Unicode(1)
    fullname = Unicode(1)
    host = Unicode(1, index=True)
    id_cc_card = Integer32
    inkeys = Unicode(1)
    ipaddr = Unicode(1, index=True)
    jitterbuffer = Unicode(1)
    language = Unicode(1)
    mask = Unicode(1)
    maxauthreq = Unicode(1)
    maxcallnumbers = Unicode(1)
    maxcallnumbers_nonvalidated = Unicode(1)
    mohinterpret = Unicode(1)
    mohsuggest = Unicode(1)
    name = Unicode(1, unique=True)
    outkey = Unicode(1)
    permit = Unicode(1)
    port = Unicode(1, index=True)
    qualify = Unicode(1)
    qualifyfreqnotok = Unicode(1)
    qualifyfreqok = Unicode(1)
    qualifysmoothing = Unicode(1)
    regcontext = Unicode(1)
    regexten = Unicode(1)
    regseconds = Integer32
    requirecalltoken = Unicode(1)
    secret = Unicode(1)
    sendani = Unicode(1)
    setvar = Unicode(1)
    sourceaddress = Unicode(1)
    timezone = Unicode(1)
    transfer = Unicode(1)
    trunk = Unicode(1)
    type = Unicode(1)
    username = Unicode(1)
Esempio n. 25
0
class Did(TableModel):
    __tablename__ = 'cc_did'

    id = Integer64(primary_key=True)
    # id_cc_country = Integer32
    # id_cc_didgroup = Integer64
    id_cc_didgroup = Integer32(null=False)
    cc_country = Country.store_as(table(left='id_cc_country'))
    activated = Integer32(null=False)
    did = Unicode(1, unique=True)
    reserved = Integer32
    iduser = Integer64(null=False)
    creationdate = Date(default_factory=date.today)
    startingdate = Date
    expirationdate = Date
    aleg_carrier_connect_charge = Decimal
    aleg_carrier_connect_charge_offp = Decimal
    aleg_carrier_cost_min = Decimal
    aleg_carrier_cost_min_offp = Decimal
    aleg_carrier_increment = Integer32
    aleg_carrier_increment_offp = Integer32
    aleg_carrier_initblock = Integer32
    aleg_carrier_initblock_offp = Integer32
    aleg_retail_connect_charge = Decimal
    aleg_retail_connect_charge_offp = Decimal
    aleg_retail_cost_min = Decimal
    aleg_retail_cost_min_offp = Decimal
    aleg_retail_increment = Integer32
    aleg_retail_increment_offp = Integer32
    aleg_retail_initblock = Integer32
    aleg_retail_initblock_offp = Integer32
    aleg_timeinterval = Unicode
    billingtype = Integer32
    connection_charge = Decimal
    description = Unicode
    fixrate = Float
    max_concurrent = Integer32
    secondusedreal = Integer32
    selling_rate = Decimal
Esempio n. 26
0
class Tariffplan(TableModel):
    __tablename__ = 'cc_tariffplan'

    id = Integer32(primary_key=True)
    calleridprefix = Unicode(1)
    creationdate = Date
    description = Unicode
    dnidprefix = Unicode(1)
    expirationdate = Date
    id_trunk = Integer32
    idowner = Integer32
    iduser = Integer32
    reftariffplan = Integer32
    secondusedcarrier = Integer32
    secondusedratecard = Integer32
    secondusedreal = Integer32
    startingdate = Date
    tariffname = Unicode(1)
Esempio n. 27
0
class SipBuddiesEmpty(TableModel):
    __tablename__ = 'cc_sip_buddies_empty'

    defaultip = Unicode(1, db_column='DEFAULTip')
    accountcode = Unicode(1)
    allow = Unicode(1)
    amaflags = Unicode(1)
    callerid = Unicode(1)
    callgroup = Unicode(1)
    cancallforward = Unicode(1)
    canreinvite = Unicode(1)
    context = Unicode(1)
    deny = Unicode(1)
    disallow = Unicode(1)
    dtmfmode = Unicode(1)
    fromdomain = Unicode(1)
    fromuser = Unicode(1)
    fullcontact = Unicode(1)
    host = Unicode(1)
    id = Integer32(primary_key=True)
    id_cc_card = Integer32
    insecure = Unicode(1)
    ipaddr = Unicode(1)
    language = Unicode(1)
    mailbox = Unicode(1)
    mask = Unicode(1)
    md5secret = Unicode(1)
    musiconhold = Unicode(1)
    name = Unicode(1)
    nat = Unicode(1)
    permit = Unicode(1)
    pickupgroup = Unicode(1)
    port = Unicode(1)
    qualify = Unicode(1)
    regexten = Unicode(1)
    regseconds = Integer32
    restrictcid = Unicode(1)
    rtpholdtimeout = Unicode(1)
    rtptimeout = Unicode(1)
    secret = Unicode(1)
    setvar = Unicode(1)
    type = Unicode(1)
    username = Unicode(1)
Esempio n. 28
0
class Trunk(TableModel):
    __tablename__ = 'cc_trunk'

    addparameter = Unicode(1)
    creationdate = Date
    failover_trunk = Integer32
    id_provider = Integer32
    id_trunk = Integer32(primary_key=True)
    if_max_use = Integer32
    inuse = Integer32
    maxuse = Integer32
    providerip = Unicode(1)
    providertech = Unicode(1)
    removeprefix = Unicode(1)
    secondusedcarrier = Integer32
    secondusedratecard = Integer32
    secondusedreal = Integer32
    status = Integer32
    trunkcode = Unicode(1)
    trunkprefix = Unicode(1)
Esempio n. 29
0
class Fortune(TableModel):
    __tablename__ = "fortune"

    id = Integer32(primary_key=True)
    message = Unicode
Esempio n. 30
0
class PackageRate(TableModel):
    __tablename__ = 'cc_package_rate'

    package = Integer32(db_column='package_id', primary_key=True)
    rate = Integer32(db_column='rate_id', primary_key=True)