-- ============================================================================
-- Table structure for llx_tm_area_operator
-- Manager-assigned: which operators belong to which area
-- One operator may belong to multiple areas (many-to-many)
-- ============================================================================

CREATE TABLE IF NOT EXISTS llx_tm_area_operator (
    rowid         INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
    fk_area       INTEGER NOT NULL,
    fk_user       INTEGER NOT NULL,
    tms           TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    fk_user_creat INTEGER  DEFAULT NULL,
    fk_user_modif INTEGER  DEFAULT NULL,
    UNIQUE KEY uk_tm_area_operator (fk_area, fk_user)
) ENGINE=innodb DEFAULT CHARSET=utf8mb4;
