CREATE TABLE ffs_user (
    USER_ID                        NUMBER(18, 0) ,
    PIN_HASH                       VARCHAR2(2048),
    STATUS                         VARCHAR2(32)  ,
    LANGUAGE_ID                    NUMBER(3, 0)      NOT NULL,
    REFRESH_RATE                   NUMBER(3, 0)  ,
    TIME_FORMAT_ID                 NUMBER(10, 0)     NOT NULL,
    DATE_FORMAT_ID                 NUMBER(10, 0)     NOT NULL,
    LONG_DATE_FORMAT_ID            NUMBER(10, 0)     NOT NULL,
    TIME_ZONE_ID                   NUMBER(3, 0)  ,
    USER_TYPE_ID                   NUMBER(5, 0)  ,
    LOGIN_ATTEMPTS                 NUMBER(10, 0) ,
    LOGIN_BLOCKED_TO               TIMESTAMP(0)  ,
    LAST_LOGIN                     TIMESTAMP(0)  ,
    MOBILE_RESOURCE_COUNT          NUMBER(10, 0) ,
    MOBILE_ACTIVITY_COUNT          NUMBER(10, 0) ,
    MOBILE_INVENTORY_COUNT         NUMBER(10, 0) ,
    ACTIONS_LINKS_NUM              NUMBER(10, 0)     NOT NULL,
    WEEK_START                     NUMBER(3, 0)      NOT NULL,
    OPTIONS                        NUMBER(3, 0)      NOT NULL,
    CREATED                        TIMESTAMP(0)  ,
    UPDATED                        TIMESTAMP(0)      NOT NULL,
    SOCIALNET_NEW_MESSAGE          NUMBER(10, 0)     NOT NULL,
    PENDING_SURVEYS                NUMBER(10, 0)     NOT NULL,
    OVERDUE_SURVEYS                NUMBER(10, 0)     NOT NULL,
    DEFAULT_EXPORT_FORMAT          VARCHAR2(4000),
    MAIN_RESOURCE_ID               NUMBER(8, 0)  ,
    DESIGN_THEME                   NUMBER(10, 0) ,
    ALLOW_VIBRATION                NUMBER(3, 0)      NOT NULL,
    ALLOW_DESKTOP_NOTIFICATIONS    NUMBER(3, 0)      NOT NULL,
    SOUND_THEME                    NUMBER(3, 0)      NOT NULL,
    AVATAR                         VARCHAR2(4000),
    ORGANIZATION_UNIT_ID           NUMBER(8, 0)  ,
    COLOR                          VARCHAR2(24)  ,
    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) ,
    USER_ID                        NUMBER(18, 0) ,
    PIN_HASH                       VARCHAR2(2048),
    STATUS                         VARCHAR2(32)  ,
    LANGUAGE_ID                    NUMBER(3, 0)      NOT NULL,
    REFRESH_RATE                   NUMBER(3, 0)  ,
    TIME_FORMAT_ID                 NUMBER(10, 0)     NOT NULL,
    DATE_FORMAT_ID                 NUMBER(10, 0)     NOT NULL,
    LONG_DATE_FORMAT_ID            NUMBER(10, 0)     NOT NULL,
    TIME_ZONE_ID                   NUMBER(3, 0)  ,
    USER_TYPE_ID                   NUMBER(5, 0)  ,
    LOGIN_ATTEMPTS                 NUMBER(10, 0) ,
    LOGIN_BLOCKED_TO               TIMESTAMP(0)  ,
    LAST_LOGIN                     TIMESTAMP(0)  ,
    MOBILE_RESOURCE_COUNT          NUMBER(10, 0) ,
    MOBILE_ACTIVITY_COUNT          NUMBER(10, 0) ,
    MOBILE_INVENTORY_COUNT         NUMBER(10, 0) ,
    ACTIONS_LINKS_NUM              NUMBER(10, 0)     NOT NULL,
    WEEK_START                     NUMBER(3, 0)      NOT NULL,
    OPTIONS                        NUMBER(3, 0)      NOT NULL,
    CREATED                        TIMESTAMP(0)  ,
    UPDATED                        TIMESTAMP(0)      NOT NULL,
    SOCIALNET_NEW_MESSAGE          NUMBER(10, 0)     NOT NULL,
    PENDING_SURVEYS                NUMBER(10, 0)     NOT NULL,
    OVERDUE_SURVEYS                NUMBER(10, 0)     NOT NULL,
    DEFAULT_EXPORT_FORMAT          VARCHAR2(4000),
    MAIN_RESOURCE_ID               NUMBER(8, 0)  ,
    DESIGN_THEME                   NUMBER(10, 0) ,
    ALLOW_VIBRATION                NUMBER(3, 0)      NOT NULL,
    ALLOW_DESKTOP_NOTIFICATIONS    NUMBER(3, 0)      NOT NULL,
    SOUND_THEME                    NUMBER(3, 0)      NOT NULL,
    AVATAR                         VARCHAR2(4000),
    ORGANIZATION_UNIT_ID           NUMBER(8, 0)  ,
    COLOR                          VARCHAR2(24)  ,
    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_user PRIMARY KEY (USER_ID, USER_ID)
);
