CREATE TABLE msc_bm_resource_event (
    BM_RUN_ID            NUMBER       ,
    SUPPLY_EVENT_ID      NUMBER           NOT NULL,
    DEMAND_ID            NUMBER           NOT NULL,
    RESOURCE_ID          NUMBER           NOT NULL,
    ORGANIZATION_ID      NUMBER           NOT NULL,
    TIME_PERIOD          NUMBER           NOT NULL,
    USAGE                NUMBER       ,
    TRANSACTION_ID       NUMBER       ,
    CREATED_BY           VARCHAR2(256)    NOT NULL,
    CREATION_DATE        TIMESTAMP(6)     NOT NULL,
    LAST_UPDATED_BY      VARCHAR2(256)    NOT NULL,
    LAST_UPDATE_DATE     TIMESTAMP(6)     NOT NULL,
    LAST_UPDATE_LOGIN    VARCHAR2(128),
    BM_RUN_ID            NUMBER       ,
    SUPPLY_EVENT_ID      NUMBER           NOT NULL,
    RESOURCE_ID          NUMBER           NOT NULL,
    ORGANIZATION_ID      NUMBER           NOT NULL,
    TIME_PERIOD          NUMBER           NOT NULL,
    USAGE                NUMBER       ,
    TRANSACTION_ID       NUMBER       ,
    CREATED_BY           VARCHAR2(256)    NOT NULL,
    CREATION_DATE        TIMESTAMP(6)     NOT NULL,
    LAST_UPDATED_BY      VARCHAR2(256)    NOT NULL,
    LAST_UPDATE_DATE     TIMESTAMP(6)     NOT NULL,
    LAST_UPDATE_LOGIN    VARCHAR2(128),
    DEMAND_ID            NUMBER           NOT NULL,
    CONSTRAINT pk_msc_bm_resource_event PRIMARY KEY (BM_RUN_ID, TRANSACTION_ID, BM_RUN_ID, TRANSACTION_ID)
);
