VbzCart/docs/tables/ord hold type: Difference between revisions

From Woozle Writes Code
< VbzCart‎ | docs‎ | tables
Jump to navigation Jump to search
imported>Woozle
(extracted from VbzCart/tables)
 
imported>Woozle
(prelim documentation; removed isActive; some renaming)
Line 1: Line 1:
==About==
==About==
''to be documented''
* '''Purpose''': Admin-maintained table for different types of order-related events and how the order itself is affected by each event of that type
* '''Relates to''': {{vbzcart|table|ord_events}}
* '''Background''': See {{vbzcart|table|ord_events}}
* '''History''':
** '''2008-12-27''' Extracted from main "tables" listing, no design changes; no documentation yet, either
** '''2009-07-12''' Removed isActive field; added "Hold" to field names for directional consistency (+1 always turns on an alert); preliminary documentation
* '''Fields''':
** '''doHoldRstk''' - alert flag
** '''doHoldChrg''' - alert flag
** '''doContact''' - alert flag
** '''doExamine''' - alert flag
===alert flags===
The alert flag fields each have 3 possible values:
: '''0''' = no change
: '''+1''' = FORBID / TURN ON ALERT
: '''-1''' = ALLOW / TURN OFF ALERT


2008-12-27 Are we actually using this, or is it part of the future online ordering system redesign?
Each one affects the corresponding field in the order (not yet implemented as of 2009-07-12) as described above when an event of the type defined in this record occurs
 
If the order has any one of these flags set, then the order is "on hold".
==SQL==
==SQL==
<section begin=sql /><mysql>CREATE TABLE `ord_event_types` (
<section begin=sql /><mysql>CREATE TABLE `ord_event_types` (
Line 8: Line 25:
   `Display`      VARCHAR(63) COMMENT "brief name for this event type",
   `Display`      VARCHAR(63) COMMENT "brief name for this event type",
   `Descr`        VARCHAR(127) COMMENT "longer description of usage",
   `Descr`        VARCHAR(127) COMMENT "longer description of usage",
   `isActive`     BOOL COMMENT "TRUE = order is open or on hold",
   `doHoldRstk` TINYINT COMMENT "forbid(+1)/allow(-1) restocking this order's items",
/* these fields all have 3 possible values:
   `doHoldChrg` TINYINT COMMENT "forbid(+1)/allow(-1) charging bank card for this order",
0 = no change
   `doContact`  TINYINT COMMENT "turn on(+1)/off(-1) need-to-contact flag for this order",
-1 = FORBID / TURN OFF
   `doExamine`  TINYINT COMMENT "turn on(+1)/off(-1) need-to-examine flag for this order",
+1 = ALLOW / TURN ON
*/
  `doRestock`  TINYINT COMMENT "allow/forbid restocking this order's items",
   `doCharge`   TINYINT COMMENT "allow/forbid charging bank card for this order",
   `doContact`  TINYINT COMMENT "turn on/off need-to-contact flag for this order",
   `doExamine`  TINYINT COMMENT "turn on/off need-to-examine flag for this order",
   PRIMARY KEY(`ID`)
   PRIMARY KEY(`ID`)
)
)
ENGINE = MYISAM;</mysql>
ENGINE = MYISAM;</mysql>
<section end=sql />
<section end=sql />

Revision as of 12:57, 12 July 2009

About

  • Purpose: Admin-maintained table for different types of order-related events and how the order itself is affected by each event of that type
  • Relates to: Template:Vbzcart
  • Background: See Template:Vbzcart
  • History:
    • 2008-12-27 Extracted from main "tables" listing, no design changes; no documentation yet, either
    • 2009-07-12 Removed isActive field; added "Hold" to field names for directional consistency (+1 always turns on an alert); preliminary documentation
  • Fields:
    • doHoldRstk - alert flag
    • doHoldChrg - alert flag
    • doContact - alert flag
    • doExamine - alert flag

alert flags

The alert flag fields each have 3 possible values:

0 = no change
+1 = FORBID / TURN ON ALERT
-1 = ALLOW / TURN OFF ALERT

Each one affects the corresponding field in the order (not yet implemented as of 2009-07-12) as described above when an event of the type defined in this record occurs

If the order has any one of these flags set, then the order is "on hold".

SQL

<section begin=sql /><mysql>CREATE TABLE `ord_event_types` (

 `ID`           INT NOT NULL AUTO_INCREMENT,
 `Display`      VARCHAR(63) COMMENT "brief name for this event type",
 `Descr`        VARCHAR(127) COMMENT "longer description of usage",
 `doHoldRstk` TINYINT COMMENT "forbid(+1)/allow(-1) restocking this order's items",
 `doHoldChrg` TINYINT COMMENT "forbid(+1)/allow(-1) charging bank card for this order",
 `doContact`  TINYINT COMMENT "turn on(+1)/off(-1) need-to-contact flag for this order",
 `doExamine`  TINYINT COMMENT "turn on(+1)/off(-1) need-to-examine flag for this order",
 PRIMARY KEY(`ID`)

) ENGINE = MYISAM;</mysql> <section end=sql />