CREATE EXTENSION IF NOT EXISTS "uuid-ossp";

CREATE TABLE users
(
    id           BIGSERIAL,
    email        VARCHAR(100) UNIQUE NOT NULL,
    password     VARCHAR(100)        NOT NULL,
    name         VARCHAR,
    status       VARCHAR(50)         NOT NULL,
    created_at   TIMESTAMP           NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updated_at   TIMESTAMP           NOT NULL DEFAULT CURRENT_TIMESTAMP,
    user_type    varchar,
    phone_number varchar,
    nik          varchar,
    created_by   INTEGER,
    updated_by   INTEGER,
    deleted_at   timestamp,
    PRIMARY KEY (id)
);

INSERT INTO users(id, name, email, password, status)
VALUES (1, 'Super Admin', 'admin@enaklo-pos.id', '$2a$10$gsDEsviRfy5gQ8ubFH/lYObL.6FuRSAoXUh6e9ZDXmWTXYzK51pPO', 'Active');