-- ========================================================================
-- Table llx_crm_raw_material
-- ========================================================================

CREATE TABLE llx_crm_raw_material (
    rowid           INTEGER AUTO_INCREMENT PRIMARY KEY,
    entity          INTEGER DEFAULT 1 NOT NULL,
    family          VARCHAR(255) NOT NULL,
    element         VARCHAR(255) NOT NULL,
    qty             INTEGER DEFAULT 0,
    total           DECIMAL(12,2) DEFAULT 0,
    status          TINYINT DEFAULT 1,
    to_delete       TINYINT DEFAULT 0,
    eliminate_stock TINYINT DEFAULT 0,
    maintain_stock_zero TINYINT DEFAULT 0,
    overstock       TINYINT DEFAULT 0,
    unit_weight     DECIMAL(10,3) DEFAULT 0,
    security_stock  INTEGER DEFAULT 0,
    minimum_stock   INTEGER DEFAULT 0,
    alert_stock     INTEGER DEFAULT 0,
    maximum_stock   INTEGER DEFAULT 0,
    import_key      VARCHAR(255) DEFAULT '',
    fk_user_creat   INTEGER,
    datec           DATETIME,
    tms             TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB;
