// Copyright (c) 2004 Kurt M. Brown. // This file is subject to the terms and conditions of the GNU General Public // License. See the file COPYING for more details. // all "id"s start with 1 tsTerminal (terminal timeslip) tsTimeslip tsBreak tsJob tsEmployee tsUser tsPerson division divisionId name divisionFarm parentBizId childBizId divisionSite divisionId siteId concept conceptId (class-instance of site, e.g., "Dairy Queen") site siteId must be unique per schema // how do we collect many non-releated sites (siteId) into one schema? // add conceptId to to pk? // we need genddl to switch on additional pk parts as perscribed // by desired architecture siteId pk conceptId name created accessGroup siteId pk accessGroupId pk user or accessor siteId pk userId pk name ak password created action actionId pk name # description -- lookup into locale account insert, update, delete terminal insert, update, delete transaction insert (auth, offline, credit, rev), update (void, change amount, tip, ...) batch insert (settlement request) agent # standard: command-line(id), terminal(terminalId), web(ipaddr) siteId pk agentId pk name key caLog caId pk logId pk when created userId who actionId which kind of entry (action is why it was done) agentId where did this action start? entry semi-formated what // boot should delete all rows // crontask cleans as necessary caProcessIndex // a row indicates pid is processing: // {caId, caTerminalId, (caTranId or caBatchId)} pid caId caTerminalId caTranId or caBatchId created ///////////// // C O R E // ///////////// encryptId (lookup code for real keys that are located elsewhere) should be provided to daemon from ssh-agent public-key used to encrypt private-key used to decrypt caEncrypt caEncryptId publicKey privateKey (encrypted) (use ssh-agent) creditAccount // ca siteId pk caId pk created tstz modified tstz entry xml caTerminal siteId pk caId pk caTerminalId pk nextTranSeq int nextBatchSeq int nextTranId int nextBatchId int created tstz modified tstz entry xml caBatch siteId pk caId pk caTerminalId pk caBatchId pk seq int (mod 1000) created tstz status batchStatus processing failed passed entry xml caTran siteId pk caId pk caTerminalId pk caTranId pk seq int (mod 10000) created tstz modified tstz encryptId int (code for actual key) hold bool (pre-auth) ?? merge with below state? encrypted: pan expdate holder ccv track address state tranState settleReady ... (see below) processing cancelled declined settleReady (first state for (credit, offline)) or hold?? hold settleReady void settling void settling settleReady (see above) settled settledFailed entry xml caBatchTran siteId pk caId pk caTerminalId pk caBatchId pk caTranId pk status batchTranStatus entry xml