VbzCart/docs/tables/cat ittyps: Difference between revisions

From Woozle Writes Code
< VbzCart‎ | docs‎ | tables
Jump to navigation Jump to search
imported>Woozle
m (removed "section" tags)
m (Woozle moved page VbzCart/VbzCart/tables/cat ittyps to VbzCart/docs/tables/cat ittyps without leaving a redirect: part 3/5)
 
(No difference)

Latest revision as of 01:56, 25 February 2024

About

  • Purpose: catalog item types - every item has one, but they are often all the same
  • Fields:
    • ID_Parent (int): Template:Vbzcart/table.ID of parent, if any
    • NameSng (string): word for single item of this type (e.g. "shirt","box")
    • NamePlr (string): word for multiple items of this type (e.g. "shirts","boxes")
    • Descr (string): longer name, e.g. "compact disc" instead of "CD". If blank, use NameSng.
      • Q: should this contain plural text? Or will we need DescrSng and DescrPlr?
    • Sort (string): sorting key (optional)
    • isType (flag): if TRUE, this type may be used for actual items; if not, it is a folder (type category)

SQL

<mysql> DROP TABLE IF EXISTS `cat_ittyps`;

CREATE TABLE `cat_ittyps` (
 `ID` INT  NOT NULL AUTO_INCREMENT,
 `ID_Parent` INT COMMENT '(self).ID of parent type; mainly for organizational purposes',
 `NameSng` varchar(63) NOT NULL COMMENT 'word for single item of this type (e.g. "shirt", "box")',
 `NamePlr` varchar(63) COMMENT 'word for multiple items of this type (e.g. "shirts", "boxes"); NULL = use singular',
 `Descr` varchar(255) COMMENT 'longer name (singular), e.g. "compact disc" instead of "CD". NULL = use singular',
 `Sort` varchar(31) COMMENT "optional sorting key",
 `isType` BOOL COMMENT 'FALSE = just a folder, so omit it from drop-down lists of types to choose from',
 PRIMARY KEY(`ID`)
) ENGINE = MYISAM;</mysql>