VbzCart/docs/tables/event vc ord hold

From Woozle Writes Code
< VbzCart‎ | docs‎ | tables
Revision as of 10:49, 1 June 2017 by imported>Woozle (a little post-move tidying; redesign yet to be done)
Jump to navigation Jump to search

About

  • Purpose: EventPlex extension for tracking events (usually or always manually-invoked) which change the status of an order
  • Related: Template:L/vbzcart/table

History

Fields

  • The do* tristate-flag fields (formerly isActive) represent the state of the order after this event, as determined by taking the order's previous flags and applying the event type's flags. This provides a record of the order's actual state over time, negating the need to follow the event history from the beginning in order to find the order's state at any given time.
  • ID_Type -> Template:L/vbzcart/table.ID
  • VbzUser is the user's wiki username, and only applies to events initiated through the wiki user interface
  • Machine hasn't been rigorously defined yet; it just needs to be some way we can tell what computer was being used (and it does not need to be authenticated; authentication records should be kept elsewhere). Ideally, it should be netname@[ip address], but various coding environments may not support both of those.

SQL

<mysql>CREATE TABLE `event_vc_ord_change` (

 `ID`             INT        NOT NULL AUTO_INCREMENT,
 `ID_Ord`         INT        NOT NULL COMMENT "core_orders.ID",
 `ID_Type`        INT        NOT NULL COMMENT "ord_event_type.ID",
 `doHoldRstk` TINYINT(1) DEFAULT NULL COMMENT "TRUE = do not base restock request items on this order",
 `doHoldChrg` TINYINT(1) DEFAULT NULL COMMENT "TRUE = do not charge bank card for this order",
 `doContact`  TINYINT(1) DEFAULT NULL COMMENT "TRUE = customer needs to be contacted about this order",
 `doExamine`  TINYINT(1) DEFAULT NULL COMMENT "TRUE = this order needs further examination",
 `WhenDone`  DATETIME                 COMMENT "when the event happened",
 `VbzUser`   VARCHAR(127)             COMMENT "VbzCart username of whoever initiated the event, if available",
 `SysUser`   VARCHAR(127)             COMMENT "who logged into the operating system, if available",
 `Machine`   VARCHAR(63)              COMMENT "network name or IP address of client",
 `Notes`     VARCHAR(255)             COMMENT "human-entered notes, if needed",
 PRIMARY KEY(`ID`)

) ENGINE = MYISAM;</mysql>