CREATE TABLE ffs_activity_segment_mode (
    ARCH_DATE            DATE             NOT NULL,
    ACTIVITY_ID          NUMBER(10, 0),
    ROUTE_DATE           DATE         ,
    RESOURCE_ID          NUMBER(8, 0) ,
    TOTAL_COUNT          NUMBER(5, 0)     NOT NULL,
    TOTAL_DURATION       NUMBER(5, 0)     NOT NULL,
    STARTED_DURATION     NUMBER(5, 0)     NOT NULL,
    FINISHED_COUNT       NUMBER(5, 0)     NOT NULL,
    FINISHED_DURATION    NUMBER(5, 0)     NOT NULL,
    CANCELLED_COUNT      NUMBER(5, 0)     NOT NULL,
    OPTIONS              NUMBER(3, 0)     NOT NULL,
    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),
    ARCH_DATE            DATE             NOT NULL,
    ACTIVITY_ID          NUMBER(10, 0),
    ROUTE_DATE           DATE         ,
    RESOURCE_ID          NUMBER(8, 0) ,
    TOTAL_COUNT          NUMBER(5, 0)     NOT NULL,
    TOTAL_DURATION       NUMBER(5, 0)     NOT NULL,
    STARTED_DURATION     NUMBER(5, 0)     NOT NULL,
    FINISHED_COUNT       NUMBER(5, 0)     NOT NULL,
    FINISHED_DURATION    NUMBER(5, 0)     NOT NULL,
    CANCELLED_COUNT      NUMBER(5, 0)     NOT NULL,
    OPTIONS              NUMBER(3, 0)     NOT NULL,
    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),
    CONSTRAINT pk_ffs_activity_segment_mode PRIMARY KEY (ACTIVITY_ID, ROUTE_DATE, RESOURCE_ID, ACTIVITY_ID, ROUTE_DATE, RESOURCE_ID)
);
