CREATE TABLE "textbook" (
    "id" BIGSERIAL PRIMARY KEY,
    "title" TEXT,
    "author" TEXT,
    "publisher" TEXT,
    "edition" TEXT,
    "file_url" TEXT,
    "file_type" TEXT,
    "validFrom" DATE,
    "validTill" DATE,
    "createdAt" DATE,
    "updatedAt" DATE,
    "createBy" TEXT,
    "modifiedBy" TEXT,
    "deletedAt" DATE,
    "version" NUMERIC,
    "status" TEXT
);
CREATE TABLE "chapter" (
    "id" BIGSERIAL PRIMARY KEY,
    "textbook_id" BIGINT,
    "title" TEXT,
    "number" NUMERIC,
    "description" TEXT,
    "start_page" NUMERIC,
    "end_page" NUMERIC,
    "validFrom" DATE,
    "validTill" DATE,
    "createdAt" DATE,
    "updatedAt" DATE,
    "createBy" TEXT,
    "modifiedBy" TEXT,
    "deletedAt" DATE,
    "version" NUMERIC,
    "status" TEXT
);
CREATE TABLE "section" (
    "id" BIGSERIAL PRIMARY KEY,
    "chapter_id" BIGINT,
    "title" TEXT,
    "number" NUMERIC,
    "description" TEXT,
    "start_page" NUMERIC,
    "end_page" NUMERIC,
    "parent_section" BIGINT,
    "validFrom" DATE,
    "validTill" DATE,
    "createdAt" DATE,
    "updatedAt" DATE,
    "createBy" TEXT,
    "modifiedBy" TEXT,
    "deletedAt" DATE,
    "version" NUMERIC,
    "status" TEXT
);
CREATE TABLE "topics" (
    "id" BIGSERIAL PRIMARY KEY,
    "section_id" BIGINT,
    "title" TEXT,
    "description" TEXT,
    "page_number" NUMERIC,
    "validFrom" DATE,
    "validTill" DATE,
    "createdAt" DATE,
    "updatedAt" DATE,
    "createBy" TEXT,
    "modifiedBy" TEXT,
    "deletedAt" DATE,
    "version" NUMERIC,
    "status" TEXT
);
CREATE TABLE "textbook_tags" (
    "id" BIGSERIAL PRIMARY KEY,
    "textbook_id" BIGINT,
    "tag_name" TEXT,
    "validFrom" DATE,
    "validTill" DATE,
    "createdAt" DATE,
    "updatedAt" DATE,
    "createBy" TEXT,
    "modifiedBy" TEXT,
    "deletedAt" DATE,
    "version" NUMERIC,
    "status" TEXT
);
CREATE TABLE "crud_config_info" (
    "id" BIGSERIAL PRIMARY KEY,
    "endPtNm" NUMERIC,
    "sqlQueryText" TEXT,
    "opsTypeName" TEXT,
    "validFrom" DATE,
    "validTill" DATE,
    "createBy" TEXT,
    "modifiedBy" TEXT,
    "status" TEXT,
    "version" NUMERIC,
    "deletedAt" DATE,
    "createdAt" DATE,
    "updatedAt" DATE
);
