VbzCart/tables/cat ittyps

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< VbzCart‎ | tables
Revision as of 15:25, 15 March 2013 by Woozle (talk | contribs) (removed "section" tags)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

  • Purpose: catalog item types - every item has one, but they are often all the same
  • Fields:
    • ID_Parent (int):
  1. REDIRECT Template:l/vc/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>