diff --git a/.vscode/settings.json b/.vscode/settings.json index 35412482..beaf1e6a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,5 @@ { - "WillLuke.nextjs.addTypesOnSave": true, - "WillLuke.nextjs.hasPrompted": true -} \ No newline at end of file + "WillLuke.nextjs.addTypesOnSave": true, + "WillLuke.nextjs.hasPrompted": true, + "prismaERDPreviewer.preferredTheme": "dark" +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f1df440..b08dbab9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +## [1.2.42](https://github.com/bipproduction/hipmi/compare/v1.2.41...v1.2.42) (2025-01-30) + +## [1.2.41](https://github.com/bipproduction/hipmi/compare/v1.2.40...v1.2.41) (2025-01-21) + ## [1.2.40](https://github.com/bipproduction/hipmi/compare/v1.2.39...v1.2.40) (2025-01-16) ## [1.2.39](https://github.com/bipproduction/hipmi/compare/v1.2.38...v1.2.39) (2025-01-12) diff --git a/backup.sql b/backup.sql new file mode 100644 index 00000000..7fe569dd --- /dev/null +++ b/backup.sql @@ -0,0 +1,3399 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 14.15 (Homebrew) +-- Dumped by pg_dump version 14.15 (Homebrew) + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +SET default_tablespace = ''; + +SET default_table_access_method = heap; + +-- +-- Name: BeritaInvestasi; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."BeritaInvestasi" ( + id text NOT NULL, + title text NOT NULL, + deskripsi text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "imagesId" text, + "investasiId" text NOT NULL, + "imageId" text +); + + +ALTER TABLE public."BeritaInvestasi" OWNER TO bip; + +-- +-- Name: BusinessMaps; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."BusinessMaps" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "namePin" text NOT NULL, + latitude double precision NOT NULL, + longitude double precision NOT NULL, + "authorId" text, + "portofolioId" text, + "imageId" text, + "pinId" text +); + + +ALTER TABLE public."BusinessMaps" OWNER TO bip; + +-- +-- Name: DokumenInvestasi; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."DokumenInvestasi" ( + id text NOT NULL, + title text NOT NULL, + url text, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "investasiId" text, + "fileId" text +); + + +ALTER TABLE public."DokumenInvestasi" OWNER TO bip; + +-- +-- Name: Donasi; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Donasi" ( + id text NOT NULL, + title text NOT NULL, + target text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "publishTime" timestamp(3) without time zone, + catatan text, + progres text DEFAULT '0'::text, + terkumpul text DEFAULT '0'::text, + "namaBank" text, + rekening text, + "akumulasiPencairan" integer DEFAULT 0, + "totalPencairan" integer DEFAULT 0, + "authorId" text, + "imagesId" text, + "donasiMaster_KategoriId" text, + "donasiMaster_DurasiId" text, + "donasiMaster_StatusDonasiId" text DEFAULT '2'::text, + "imageId" text +); + + +ALTER TABLE public."Donasi" OWNER TO bip; + +-- +-- Name: DonasiMaster_Bank; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."DonasiMaster_Bank" ( + id text NOT NULL, + name text NOT NULL, + norek text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL +); + + +ALTER TABLE public."DonasiMaster_Bank" OWNER TO bip; + +-- +-- Name: DonasiMaster_Durasi; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."DonasiMaster_Durasi" ( + id text NOT NULL, + name text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL +); + + +ALTER TABLE public."DonasiMaster_Durasi" OWNER TO bip; + +-- +-- Name: DonasiMaster_Kategori; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."DonasiMaster_Kategori" ( + id text NOT NULL, + name text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL +); + + +ALTER TABLE public."DonasiMaster_Kategori" OWNER TO bip; + +-- +-- Name: DonasiMaster_StatusDonasi; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."DonasiMaster_StatusDonasi" ( + id text NOT NULL, + name text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL +); + + +ALTER TABLE public."DonasiMaster_StatusDonasi" OWNER TO bip; + +-- +-- Name: DonasiMaster_StatusInvoice; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."DonasiMaster_StatusInvoice" ( + id text NOT NULL, + name text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL +); + + +ALTER TABLE public."DonasiMaster_StatusInvoice" OWNER TO bip; + +-- +-- Name: Donasi_Cerita; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Donasi_Cerita" ( + id text NOT NULL, + pembukaan text NOT NULL, + cerita text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "imagesId" text, + "donasiId" text, + "imageId" text +); + + +ALTER TABLE public."Donasi_Cerita" OWNER TO bip; + +-- +-- Name: Donasi_Invoice; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Donasi_Invoice" ( + id text NOT NULL, + nominal text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "donasiId" text, + "donasiMaster_BankId" text, + "donasiMaster_StatusInvoiceId" text DEFAULT '3'::text, + "authorId" text, + "imagesId" text, + "imageId" text +); + + +ALTER TABLE public."Donasi_Invoice" OWNER TO bip; + +-- +-- Name: Donasi_Kabar; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Donasi_Kabar" ( + id text NOT NULL, + title text NOT NULL, + deskripsi text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "donasiId" text, + "imagesId" text, + "imageId" text +); + + +ALTER TABLE public."Donasi_Kabar" OWNER TO bip; + +-- +-- Name: Donasi_Notif; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Donasi_Notif" ( + id text NOT NULL, + "isRead" boolean DEFAULT false NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "userId" text, + "donasi_KabarId" text +); + + +ALTER TABLE public."Donasi_Notif" OWNER TO bip; + +-- +-- Name: Donasi_PencairanDana; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Donasi_PencairanDana" ( + id text NOT NULL, + "nominalCair" integer NOT NULL, + title text NOT NULL, + deskripsi text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "donasiId" text, + "imagesId" text, + "imageId" text +); + + +ALTER TABLE public."Donasi_PencairanDana" OWNER TO bip; + +-- +-- Name: Donasi_TemporaryCreate; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Donasi_TemporaryCreate" ( + id text NOT NULL, + title text NOT NULL, + target text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "imagesId" text, + "donasiMaster_KategoriId" text, + "donasiMaster_DurasiId" text, + "imageId" text +); + + +ALTER TABLE public."Donasi_TemporaryCreate" OWNER TO bip; + +-- +-- Name: Event; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Event" ( + id text NOT NULL, + title text NOT NULL, + lokasi text NOT NULL, + tanggal timestamp(3) without time zone, + deskripsi text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + catatan text, + "tanggalSelesai" timestamp(3) without time zone, + "isArsip" boolean DEFAULT false, + "authorId" text, + "eventMaster_StatusId" text DEFAULT '2'::text, + "eventMaster_TipeAcaraId" integer +); + + +ALTER TABLE public."Event" OWNER TO bip; + +-- +-- Name: EventMaster_Status; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."EventMaster_Status" ( + id text NOT NULL, + name text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL +); + + +ALTER TABLE public."EventMaster_Status" OWNER TO bip; + +-- +-- Name: EventMaster_TipeAcara; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."EventMaster_TipeAcara" ( + id integer NOT NULL, + name text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL +); + + +ALTER TABLE public."EventMaster_TipeAcara" OWNER TO bip; + +-- +-- Name: EventMaster_TipeAcara_id_seq; Type: SEQUENCE; Schema: public; Owner: bip +-- + +CREATE SEQUENCE public."EventMaster_TipeAcara_id_seq" + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE public."EventMaster_TipeAcara_id_seq" OWNER TO bip; + +-- +-- Name: EventMaster_TipeAcara_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: bip +-- + +ALTER SEQUENCE public."EventMaster_TipeAcara_id_seq" OWNED BY public."EventMaster_TipeAcara".id; + + +-- +-- Name: EventSponsor; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."EventSponsor" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + name text NOT NULL, + "fileName" text NOT NULL, + "fileExt" text, + "fileId" text NOT NULL, + "auhtorId" text, + "eventId" text +); + + +ALTER TABLE public."EventSponsor" OWNER TO bip; + +-- +-- Name: EventTransaksi; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."EventTransaksi" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + nominal integer NOT NULL, + "masterBankId" text, + status text NOT NULL, + "transferImageId" text, + "authorId" text, + "eventId" text, + "eventSponsorId" text +); + + +ALTER TABLE public."EventTransaksi" OWNER TO bip; + +-- +-- Name: Event_Peserta; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Event_Peserta" ( + id text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "isPresent" boolean DEFAULT false NOT NULL, + "eventId" text, + "userId" text +); + + +ALTER TABLE public."Event_Peserta" OWNER TO bip; + +-- +-- Name: ForumMaster_KategoriReport; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."ForumMaster_KategoriReport" ( + id integer NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + title text NOT NULL, + deskripsi text NOT NULL +); + + +ALTER TABLE public."ForumMaster_KategoriReport" OWNER TO bip; + +-- +-- Name: ForumMaster_KategoriReport_id_seq; Type: SEQUENCE; Schema: public; Owner: bip +-- + +CREATE SEQUENCE public."ForumMaster_KategoriReport_id_seq" + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE public."ForumMaster_KategoriReport_id_seq" OWNER TO bip; + +-- +-- Name: ForumMaster_KategoriReport_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: bip +-- + +ALTER SEQUENCE public."ForumMaster_KategoriReport_id_seq" OWNED BY public."ForumMaster_KategoriReport".id; + + +-- +-- Name: ForumMaster_StatusPosting; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."ForumMaster_StatusPosting" ( + id integer NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + status text NOT NULL +); + + +ALTER TABLE public."ForumMaster_StatusPosting" OWNER TO bip; + +-- +-- Name: ForumMaster_StatusPosting_id_seq; Type: SEQUENCE; Schema: public; Owner: bip +-- + +CREATE SEQUENCE public."ForumMaster_StatusPosting_id_seq" + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE public."ForumMaster_StatusPosting_id_seq" OWNER TO bip; + +-- +-- Name: ForumMaster_StatusPosting_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: bip +-- + +ALTER SEQUENCE public."ForumMaster_StatusPosting_id_seq" OWNED BY public."ForumMaster_StatusPosting".id; + + +-- +-- Name: Forum_Komentar; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Forum_Komentar" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + komentar text NOT NULL, + "forum_PostingId" text, + "authorId" text +); + + +ALTER TABLE public."Forum_Komentar" OWNER TO bip; + +-- +-- Name: Forum_Posting; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Forum_Posting" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "publishAt" timestamp(3) without time zone, + diskusi text NOT NULL, + "authorId" text, + "forumMaster_StatusPostingId" integer +); + + +ALTER TABLE public."Forum_Posting" OWNER TO bip; + +-- +-- Name: Forum_ReportKomentar; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Forum_ReportKomentar" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + deskripsi text, + "forumMaster_KategoriReportId" integer, + "forum_KomentarId" text, + "userId" text +); + + +ALTER TABLE public."Forum_ReportKomentar" OWNER TO bip; + +-- +-- Name: Forum_ReportPosting; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Forum_ReportPosting" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + deskripsi text, + "forumMaster_KategoriReportId" integer, + "forum_PostingId" text, + "userId" text +); + + +ALTER TABLE public."Forum_ReportPosting" OWNER TO bip; + +-- +-- Name: Images; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Images" ( + id text NOT NULL, + url text NOT NULL, + label text DEFAULT 'null'::text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE public."Images" OWNER TO bip; + +-- +-- Name: Investasi; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Investasi" ( + id text NOT NULL, + title text NOT NULL, + "targetDana" text NOT NULL, + "hargaLembar" text NOT NULL, + "totalLembar" text NOT NULL, + roi text NOT NULL, + active boolean DEFAULT true NOT NULL, + "countDown" timestamp(3) without time zone, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "authorId" text, + catatan text, + "sisaLembar" text NOT NULL, + "lembarTerbeli" text DEFAULT '0'::text, + progress text DEFAULT '0'::text, + "masterPeriodeDevidenId" text, + "masterPembagianDevidenId" text, + "masterPencarianInvestorId" text, + "imagesId" text, + "masterStatusInvestasiId" text DEFAULT '2'::text, + "masterProgresInvestasiId" text, + "imageId" text, + "prospektusFileId" text +); + + +ALTER TABLE public."Investasi" OWNER TO bip; + +-- +-- Name: InvestasiMaster_StatusInvoice; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."InvestasiMaster_StatusInvoice" ( + id text NOT NULL, + name text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL +); + + +ALTER TABLE public."InvestasiMaster_StatusInvoice" OWNER TO bip; + +-- +-- Name: Investasi_Invoice; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Investasi_Invoice" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + nominal text NOT NULL, + "lembarTerbeli" text NOT NULL, + "investasiId" text, + "masterBankId" text, + "statusInvoiceId" text, + "authorId" text, + "imagesId" text, + "imageId" text +); + + +ALTER TABLE public."Investasi_Invoice" OWNER TO bip; + +-- +-- Name: Job; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Job" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "isArsip" boolean DEFAULT false NOT NULL, + catatan text, + title text NOT NULL, + content text NOT NULL, + deskripsi text NOT NULL, + "authorId" text, + "masterStatusId" text DEFAULT '2'::text, + "imageId" text +); + + +ALTER TABLE public."Job" OWNER TO bip; + +-- +-- Name: KodeOtp; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."KodeOtp" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + nomor text NOT NULL, + otp integer NOT NULL +); + + +ALTER TABLE public."KodeOtp" OWNER TO bip; + +-- +-- Name: MasterBank; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."MasterBank" ( + id text NOT NULL, + "namaBank" text NOT NULL, + "namaAkun" text NOT NULL, + norek text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL +); + + +ALTER TABLE public."MasterBank" OWNER TO bip; + +-- +-- Name: MasterBidangBisnis; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."MasterBidangBisnis" ( + id text NOT NULL, + name text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE public."MasterBidangBisnis" OWNER TO bip; + +-- +-- Name: MasterKategoriApp; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."MasterKategoriApp" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + name text NOT NULL, + value text +); + + +ALTER TABLE public."MasterKategoriApp" OWNER TO bip; + +-- +-- Name: MasterPembagianDeviden; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."MasterPembagianDeviden" ( + id text NOT NULL, + name text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE public."MasterPembagianDeviden" OWNER TO bip; + +-- +-- Name: MasterPencarianInvestor; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."MasterPencarianInvestor" ( + id text NOT NULL, + name text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE public."MasterPencarianInvestor" OWNER TO bip; + +-- +-- Name: MasterPeriodeDeviden; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."MasterPeriodeDeviden" ( + id text NOT NULL, + name text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE public."MasterPeriodeDeviden" OWNER TO bip; + +-- +-- Name: MasterProgresInvestasi; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."MasterProgresInvestasi" ( + id text NOT NULL, + name text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL +); + + +ALTER TABLE public."MasterProgresInvestasi" OWNER TO bip; + +-- +-- Name: MasterStatus; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."MasterStatus" ( + id text NOT NULL, + name text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL +); + + +ALTER TABLE public."MasterStatus" OWNER TO bip; + +-- +-- Name: MasterStatusInvestasi; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."MasterStatusInvestasi" ( + id text NOT NULL, + name text NOT NULL, + color text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL +); + + +ALTER TABLE public."MasterStatusInvestasi" OWNER TO bip; + +-- +-- Name: MasterStatusTransaksiInvestasi; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."MasterStatusTransaksiInvestasi" ( + id text NOT NULL, + name text NOT NULL, + color text, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL +); + + +ALTER TABLE public."MasterStatusTransaksiInvestasi" OWNER TO bip; + +-- +-- Name: MasterUserRole; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."MasterUserRole" ( + id text NOT NULL, + name text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP, + "updatedAt" timestamp(3) without time zone +); + + +ALTER TABLE public."MasterUserRole" OWNER TO bip; + +-- +-- Name: NomorAdmin; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."NomorAdmin" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + nomor text NOT NULL +); + + +ALTER TABLE public."NomorAdmin" OWNER TO bip; + +-- +-- Name: Notifikasi; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Notifikasi" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "isRead" boolean DEFAULT false NOT NULL, + "appId" text NOT NULL, + "kategoriApp" text NOT NULL, + pesan text NOT NULL, + title text, + status text, + "userRoleId" text NOT NULL, + "userId" text, + "adminId" text +); + + +ALTER TABLE public."Notifikasi" OWNER TO bip; + +-- +-- Name: Portofolio; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Portofolio" ( + id text NOT NULL, + "id_Portofolio" text NOT NULL, + "namaBisnis" text NOT NULL, + "alamatKantor" text NOT NULL, + tlpn text NOT NULL, + deskripsi text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "profileId" text, + "masterBidangBisnisId" text NOT NULL, + "logoId" text +); + + +ALTER TABLE public."Portofolio" OWNER TO bip; + +-- +-- Name: Portofolio_MediaSosial; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Portofolio_MediaSosial" ( + id text NOT NULL, + facebook text, + twitter text, + instagram text, + tiktok text, + youtube text, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "portofolioId" text +); + + +ALTER TABLE public."Portofolio_MediaSosial" OWNER TO bip; + +-- +-- Name: Profile; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Profile" ( + id text NOT NULL, + name text NOT NULL, + email text NOT NULL, + alamat text NOT NULL, + "jenisKelamin" text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "userId" text, + "imageId" text, + "imageBackgroundId" text +); + + +ALTER TABLE public."Profile" OWNER TO bip; + +-- +-- Name: ProjectCollaboration; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."ProjectCollaboration" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + title text NOT NULL, + lokasi text NOT NULL, + purpose text NOT NULL, + benefit text, + "isReject" boolean DEFAULT false, + report text, + "projectCollaborationMaster_IndustriId" integer, + "userId" text, + "projectCollaborationMaster_StatusId" integer DEFAULT 1 +); + + +ALTER TABLE public."ProjectCollaboration" OWNER TO bip; + +-- +-- Name: ProjectCollaborationMaster_Industri; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."ProjectCollaborationMaster_Industri" ( + id integer NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + name text NOT NULL +); + + +ALTER TABLE public."ProjectCollaborationMaster_Industri" OWNER TO bip; + +-- +-- Name: ProjectCollaborationMaster_Industri_id_seq; Type: SEQUENCE; Schema: public; Owner: bip +-- + +CREATE SEQUENCE public."ProjectCollaborationMaster_Industri_id_seq" + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE public."ProjectCollaborationMaster_Industri_id_seq" OWNER TO bip; + +-- +-- Name: ProjectCollaborationMaster_Industri_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: bip +-- + +ALTER SEQUENCE public."ProjectCollaborationMaster_Industri_id_seq" OWNED BY public."ProjectCollaborationMaster_Industri".id; + + +-- +-- Name: ProjectCollaborationMaster_Status; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."ProjectCollaborationMaster_Status" ( + id integer NOT NULL, + name text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL +); + + +ALTER TABLE public."ProjectCollaborationMaster_Status" OWNER TO bip; + +-- +-- Name: ProjectCollaborationMaster_Status_id_seq; Type: SEQUENCE; Schema: public; Owner: bip +-- + +CREATE SEQUENCE public."ProjectCollaborationMaster_Status_id_seq" + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +ALTER TABLE public."ProjectCollaborationMaster_Status_id_seq" OWNER TO bip; + +-- +-- Name: ProjectCollaborationMaster_Status_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: bip +-- + +ALTER SEQUENCE public."ProjectCollaborationMaster_Status_id_seq" OWNED BY public."ProjectCollaborationMaster_Status".id; + + +-- +-- Name: ProjectCollaboration_AnggotaRoomChat; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."ProjectCollaboration_AnggotaRoomChat" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "userId" text NOT NULL, + "projectCollaboration_RoomChatId" text +); + + +ALTER TABLE public."ProjectCollaboration_AnggotaRoomChat" OWNER TO bip; + +-- +-- Name: ProjectCollaboration_Message; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."ProjectCollaboration_Message" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + message text NOT NULL, + "isFile" boolean DEFAULT false, + "userId" text, + "projectCollaboration_RoomChatId" text +); + + +ALTER TABLE public."ProjectCollaboration_Message" OWNER TO bip; + +-- +-- Name: ProjectCollaboration_Notifikasi; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."ProjectCollaboration_Notifikasi" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "isRead" boolean DEFAULT false NOT NULL, + note text, + "projectCollaborationId" text NOT NULL, + "adminId" text NOT NULL, + "userId" text NOT NULL +); + + +ALTER TABLE public."ProjectCollaboration_Notifikasi" OWNER TO bip; + +-- +-- Name: ProjectCollaboration_Partisipasi; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."ProjectCollaboration_Partisipasi" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "userId" text, + "projectCollaborationId" text, + deskripsi_diri text NOT NULL +); + + +ALTER TABLE public."ProjectCollaboration_Partisipasi" OWNER TO bip; + +-- +-- Name: ProjectCollaboration_RoomChat; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."ProjectCollaboration_RoomChat" ( + id text NOT NULL, + name text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "userId" text, + "projectCollaborationId" text +); + + +ALTER TABLE public."ProjectCollaboration_RoomChat" OWNER TO bip; + +-- +-- Name: ProspektusInvestasi; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."ProspektusInvestasi" ( + id text NOT NULL, + url text NOT NULL, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "investasiId" text, + "fileId" text, + title text +); + + +ALTER TABLE public."ProspektusInvestasi" OWNER TO bip; + +-- +-- Name: TransaksiInvestasi; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."TransaksiInvestasi" ( + id text NOT NULL, + "investasiId" text NOT NULL, + "authorId" text NOT NULL, + "namaBank" text, + "nomorRekening" text, + token text, + redirect_url text, + quantity text NOT NULL, + price text NOT NULL, + gross_amount text NOT NULL, + merchant_name text NOT NULL, + status_code text, + status_message text, + transaction_id text, + order_id text, + payment_type text, + transaction_time text, + transaction_status text, + fraud_status text, + pdf_url text, + finish_redirect_url text, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "masterStatusTransaksiInvestasiId" text DEFAULT '1'::text +); + + +ALTER TABLE public."TransaksiInvestasi" OWNER TO bip; + +-- +-- Name: User; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."User" ( + id text NOT NULL, + active boolean DEFAULT false NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP, + "masterUserRoleId" text DEFAULT '1'::text NOT NULL, + nomor text NOT NULL, + "updatedAt" timestamp(3) without time zone, + username text NOT NULL +); + + +ALTER TABLE public."User" OWNER TO bip; + +-- +-- Name: UserSession; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."UserSession" ( + id text NOT NULL, + token text NOT NULL, + expires timestamp(3) without time zone, + active boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "userId" text NOT NULL +); + + +ALTER TABLE public."UserSession" OWNER TO bip; + +-- +-- Name: Voting; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Voting" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "isArsip" boolean DEFAULT false NOT NULL, + title text NOT NULL, + deskripsi text NOT NULL, + "awalVote" timestamp(3) without time zone NOT NULL, + "akhirVote" timestamp(3) without time zone NOT NULL, + catatan text, + "authorId" text NOT NULL, + "voting_StatusId" text DEFAULT '2'::text +); + + +ALTER TABLE public."Voting" OWNER TO bip; + +-- +-- Name: Voting_DaftarNamaVote; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Voting_DaftarNamaVote" ( + id text NOT NULL, + value text NOT NULL, + jumlah integer DEFAULT 0 NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "votingId" text +); + + +ALTER TABLE public."Voting_DaftarNamaVote" OWNER TO bip; + +-- +-- Name: Voting_Kontributor; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Voting_Kontributor" ( + id text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL, + "votingId" text, + "authorId" text, + "voting_DaftarNamaVoteId" text +); + + +ALTER TABLE public."Voting_Kontributor" OWNER TO bip; + +-- +-- Name: Voting_Status; Type: TABLE; Schema: public; Owner: bip +-- + +CREATE TABLE public."Voting_Status" ( + id text NOT NULL, + name text NOT NULL, + "isActive" boolean DEFAULT true NOT NULL, + "createdAt" timestamp(3) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, + "updatedAt" timestamp(3) without time zone NOT NULL +); + + +ALTER TABLE public."Voting_Status" OWNER TO bip; + +-- +-- Name: EventMaster_TipeAcara id; Type: DEFAULT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."EventMaster_TipeAcara" ALTER COLUMN id SET DEFAULT nextval('public."EventMaster_TipeAcara_id_seq"'::regclass); + + +-- +-- Name: ForumMaster_KategoriReport id; Type: DEFAULT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ForumMaster_KategoriReport" ALTER COLUMN id SET DEFAULT nextval('public."ForumMaster_KategoriReport_id_seq"'::regclass); + + +-- +-- Name: ForumMaster_StatusPosting id; Type: DEFAULT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ForumMaster_StatusPosting" ALTER COLUMN id SET DEFAULT nextval('public."ForumMaster_StatusPosting_id_seq"'::regclass); + + +-- +-- Name: ProjectCollaborationMaster_Industri id; Type: DEFAULT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaborationMaster_Industri" ALTER COLUMN id SET DEFAULT nextval('public."ProjectCollaborationMaster_Industri_id_seq"'::regclass); + + +-- +-- Name: ProjectCollaborationMaster_Status id; Type: DEFAULT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaborationMaster_Status" ALTER COLUMN id SET DEFAULT nextval('public."ProjectCollaborationMaster_Status_id_seq"'::regclass); + + +-- +-- Data for Name: BeritaInvestasi; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."BeritaInvestasi" (id, title, deskripsi, active, "createdAt", "updatedAt", "imagesId", "investasiId", "imageId") FROM stdin; +\. + + +-- +-- Data for Name: BusinessMaps; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."BusinessMaps" (id, "isActive", "createdAt", "updatedAt", "namePin", latitude, longitude, "authorId", "portofolioId", "imageId", "pinId") FROM stdin; +\. + + +-- +-- Data for Name: DokumenInvestasi; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."DokumenInvestasi" (id, title, url, active, "createdAt", "updatedAt", "investasiId", "fileId") FROM stdin; +\. + + +-- +-- Data for Name: Donasi; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Donasi" (id, title, target, active, "createdAt", "updatedAt", "publishTime", catatan, progres, terkumpul, "namaBank", rekening, "akumulasiPencairan", "totalPencairan", "authorId", "imagesId", "donasiMaster_KategoriId", "donasiMaster_DurasiId", "donasiMaster_StatusDonasiId", "imageId") FROM stdin; +\. + + +-- +-- Data for Name: DonasiMaster_Bank; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."DonasiMaster_Bank" (id, name, norek, active, "createdAt", "updatedAt") FROM stdin; +1 BRI 9065456754325643 t 2025-01-23 02:59:24.313 2025-01-23 02:59:24.313 +2 BCA 2304235678854332 t 2025-01-23 02:59:24.315 2025-01-23 02:59:24.315 +3 BNI 1104786754324564 t 2025-01-23 02:59:24.316 2025-01-23 02:59:24.316 +4 BSI 7076543567898976 t 2025-01-23 02:59:24.317 2025-01-23 02:59:24.317 +\. + + +-- +-- Data for Name: DonasiMaster_Durasi; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."DonasiMaster_Durasi" (id, name, active, "createdAt", "updatedAt") FROM stdin; +1 30 t 2025-01-23 02:59:24.308 2025-01-23 02:59:24.308 +2 60 t 2025-01-23 02:59:24.311 2025-01-23 02:59:24.311 +3 90 t 2025-01-23 02:59:24.312 2025-01-23 02:59:24.312 +4 120 t 2025-01-23 02:59:24.313 2025-01-23 02:59:24.313 +\. + + +-- +-- Data for Name: DonasiMaster_Kategori; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."DonasiMaster_Kategori" (id, name, active, "createdAt", "updatedAt") FROM stdin; +1 Medis t 2025-01-23 02:59:24.304 2025-01-23 02:59:24.304 +2 Kegiatan Sosial t 2025-01-23 02:59:24.305 2025-01-23 02:59:24.305 +3 Pendidikan t 2025-01-23 02:59:24.306 2025-01-23 02:59:24.306 +4 Rumah Ibadah t 2025-01-23 02:59:24.307 2025-01-23 02:59:24.307 +5 Bencana Alam t 2025-01-23 02:59:24.307 2025-01-23 02:59:24.307 +\. + + +-- +-- Data for Name: DonasiMaster_StatusDonasi; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."DonasiMaster_StatusDonasi" (id, name, active, "createdAt", "updatedAt") FROM stdin; +1 Publish t 2025-01-23 02:59:24.3 2025-01-23 02:59:24.3 +2 Review t 2025-01-23 02:59:24.302 2025-01-23 02:59:24.302 +3 Draft t 2025-01-23 02:59:24.302 2025-01-23 02:59:24.302 +4 Reject t 2025-01-23 02:59:24.303 2025-01-23 02:59:24.303 +\. + + +-- +-- Data for Name: DonasiMaster_StatusInvoice; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."DonasiMaster_StatusInvoice" (id, name, active, "createdAt", "updatedAt") FROM stdin; +1 Berhasil t 2025-01-23 02:59:24.318 2025-01-23 02:59:24.318 +2 Proses t 2025-01-23 02:59:24.319 2025-01-23 02:59:24.319 +3 Menunggu t 2025-01-23 02:59:24.32 2025-01-23 02:59:24.32 +4 Gagal t 2025-01-23 02:59:24.32 2025-01-23 02:59:24.32 +\. + + +-- +-- Data for Name: Donasi_Cerita; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Donasi_Cerita" (id, pembukaan, cerita, active, "createdAt", "updatedAt", "imagesId", "donasiId", "imageId") FROM stdin; +\. + + +-- +-- Data for Name: Donasi_Invoice; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Donasi_Invoice" (id, nominal, active, "createdAt", "updatedAt", "donasiId", "donasiMaster_BankId", "donasiMaster_StatusInvoiceId", "authorId", "imagesId", "imageId") FROM stdin; +\. + + +-- +-- Data for Name: Donasi_Kabar; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Donasi_Kabar" (id, title, deskripsi, active, "createdAt", "updatedAt", "donasiId", "imagesId", "imageId") FROM stdin; +\. + + +-- +-- Data for Name: Donasi_Notif; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Donasi_Notif" (id, "isRead", active, "createdAt", "updatedAt", "userId", "donasi_KabarId") FROM stdin; +\. + + +-- +-- Data for Name: Donasi_PencairanDana; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Donasi_PencairanDana" (id, "nominalCair", title, deskripsi, active, "createdAt", "updatedAt", "donasiId", "imagesId", "imageId") FROM stdin; +\. + + +-- +-- Data for Name: Donasi_TemporaryCreate; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Donasi_TemporaryCreate" (id, title, target, active, "createdAt", "updatedAt", "imagesId", "donasiMaster_KategoriId", "donasiMaster_DurasiId", "imageId") FROM stdin; +\. + + +-- +-- Data for Name: Event; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Event" (id, title, lokasi, tanggal, deskripsi, active, "createdAt", "updatedAt", catatan, "tanggalSelesai", "isArsip", "authorId", "eventMaster_StatusId", "eventMaster_TipeAcaraId") FROM stdin; +\. + + +-- +-- Data for Name: EventMaster_Status; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."EventMaster_Status" (id, name, active, "createdAt", "updatedAt") FROM stdin; +1 Publish t 2025-01-23 02:59:24.321 2025-01-23 02:59:24.321 +2 Review t 2025-01-23 02:59:24.323 2025-01-23 02:59:24.323 +3 Draft t 2025-01-23 02:59:24.325 2025-01-23 02:59:24.325 +4 Reject t 2025-01-23 02:59:24.326 2025-01-23 02:59:24.326 +\. + + +-- +-- Data for Name: EventMaster_TipeAcara; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."EventMaster_TipeAcara" (id, name, active, "createdAt", "updatedAt") FROM stdin; +1 Seminar t 2025-01-23 02:59:24.327 2025-01-23 02:59:24.327 +2 Workshop t 2025-01-23 02:59:24.332 2025-01-23 02:59:24.332 +3 Konferensi t 2025-01-23 02:59:24.333 2025-01-23 02:59:24.333 +4 Musyawarah Anggota t 2025-01-23 02:59:24.333 2025-01-23 02:59:24.333 +5 Kegiatan Sosial t 2025-01-23 02:59:24.334 2025-01-23 02:59:24.334 +\. + + +-- +-- Data for Name: EventSponsor; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."EventSponsor" (id, "isActive", "createdAt", "updatedAt", name, "fileName", "fileExt", "fileId", "auhtorId", "eventId") FROM stdin; +\. + + +-- +-- Data for Name: EventTransaksi; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."EventTransaksi" (id, "isActive", "createdAt", "updatedAt", nominal, "masterBankId", status, "transferImageId", "authorId", "eventId", "eventSponsorId") FROM stdin; +\. + + +-- +-- Data for Name: Event_Peserta; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Event_Peserta" (id, active, "createdAt", "updatedAt", "isPresent", "eventId", "userId") FROM stdin; +\. + + +-- +-- Data for Name: ForumMaster_KategoriReport; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."ForumMaster_KategoriReport" (id, "isActive", "createdAt", "updatedAt", title, deskripsi) FROM stdin; +1 t 2025-01-23 02:59:24.343 2025-01-23 02:59:24.343 Kebencian Cercaan, Stereotip rasis atau seksis, Dehumanisasi, Menyulut ketakutan atau diskriminasi, Referensi kebencian, Simbol & logo kebencian +2 t 2025-01-23 02:59:24.352 2025-01-23 02:59:24.352 Penghinaan & Pelecehan secara Online Penghinaan, Konten Seksual yang Tidak Diinginkan, Penyangkalan Peristiwa Kekerasan, Pelecehan Bertarget dan Memprovokasi Pelecehan +3 t 2025-01-23 02:59:24.353 2025-01-23 02:59:24.353 Tutur Kekerasan Ancaman Kekerasan, Berharap Terjadinya Celaka, Mengagungkan Kekerasan, Penghasutan Kekerasan, Penghasutan Kekerasan dengan Kode +4 t 2025-01-23 02:59:24.355 2025-01-23 02:59:24.355 Keselamatan Anak Eksploitasi seks anak di bawah umur, grooming, kekerasan fisik terhadap anak, pengguna di bawah umur +5 t 2025-01-23 02:59:24.356 2025-01-23 02:59:24.356 Privasi Membagikan informasi pribadi, mengancam akan membagikan/menyebarkan informasi pribadi, membagikan gambar intim tanpa persetujuan, membagikan gambar saya yang tidak saya kehendaki di platform ini +6 t 2025-01-23 02:59:24.357 2025-01-23 02:59:24.357 Spam Akun palsu, penipuan keuangan, memposting tautan berbahaya, menyalahgunakan hashtag, keterlibatan palsu, balasan berulang, Posting Ulang, atau Direct Message +\. + + +-- +-- Data for Name: ForumMaster_StatusPosting; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."ForumMaster_StatusPosting" (id, "isActive", "createdAt", "updatedAt", status) FROM stdin; +1 t 2025-01-23 02:59:24.359 2025-01-23 02:59:24.359 Open +2 t 2025-01-23 02:59:24.362 2025-01-23 02:59:24.362 Closed +\. + + +-- +-- Data for Name: Forum_Komentar; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Forum_Komentar" (id, "isActive", "createdAt", "updatedAt", komentar, "forum_PostingId", "authorId") FROM stdin; +\. + + +-- +-- Data for Name: Forum_Posting; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Forum_Posting" (id, "isActive", "createdAt", "updatedAt", "publishAt", diskusi, "authorId", "forumMaster_StatusPostingId") FROM stdin; +\. + + +-- +-- Data for Name: Forum_ReportKomentar; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Forum_ReportKomentar" (id, "isActive", "createdAt", "updatedAt", deskripsi, "forumMaster_KategoriReportId", "forum_KomentarId", "userId") FROM stdin; +\. + + +-- +-- Data for Name: Forum_ReportPosting; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Forum_ReportPosting" (id, "isActive", "createdAt", "updatedAt", deskripsi, "forumMaster_KategoriReportId", "forum_PostingId", "userId") FROM stdin; +\. + + +-- +-- Data for Name: Images; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Images" (id, url, label, active, "createdAt", "updatedAt") FROM stdin; +\. + + +-- +-- Data for Name: Investasi; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Investasi" (id, title, "targetDana", "hargaLembar", "totalLembar", roi, active, "countDown", "createdAt", "updatedAt", "authorId", catatan, "sisaLembar", "lembarTerbeli", progress, "masterPeriodeDevidenId", "masterPembagianDevidenId", "masterPencarianInvestorId", "imagesId", "masterStatusInvestasiId", "masterProgresInvestasiId", "imageId", "prospektusFileId") FROM stdin; +\. + + +-- +-- Data for Name: InvestasiMaster_StatusInvoice; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."InvestasiMaster_StatusInvoice" (id, name, "isActive", "createdAt", "updatedAt") FROM stdin; +1 Berhasil t 2025-01-23 02:59:24.391 2025-01-23 02:59:24.391 +2 Proses t 2025-01-23 02:59:24.394 2025-01-23 02:59:24.394 +3 Menunggu t 2025-01-23 02:59:24.394 2025-01-23 02:59:24.394 +4 Gagal t 2025-01-23 02:59:24.395 2025-01-23 02:59:24.395 +\. + + +-- +-- Data for Name: Investasi_Invoice; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Investasi_Invoice" (id, "isActive", "createdAt", "updatedAt", nominal, "lembarTerbeli", "investasiId", "masterBankId", "statusInvoiceId", "authorId", "imagesId", "imageId") FROM stdin; +\. + + +-- +-- Data for Name: Job; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Job" (id, "isActive", "createdAt", "updatedAt", "isArsip", catatan, title, content, deskripsi, "authorId", "masterStatusId", "imageId") FROM stdin; +\. + + +-- +-- Data for Name: KodeOtp; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."KodeOtp" (id, "isActive", "createdAt", "updatedAt", nomor, otp) FROM stdin; +cm68pm6ko0000wphyvrmd8j3l t 2025-01-23 02:24:18.87 2025-01-23 02:24:18.87 6282340374412 8964 +cm68pzrr2000awphyi0sdyp5v t 2025-01-23 02:34:52.862 2025-01-23 02:34:52.862 628234037441 2520 +cm68qcugj000cwphy2bjuw22r t 2025-01-23 02:45:02.898 2025-01-23 02:45:02.898 628234037441 1673 +cm68qh2pj000ewphy4qs5ismv t 2025-01-23 02:48:20.216 2025-01-23 02:48:20.216 6289647037426 5112 +cm68qrjvk0000bmx164jj6y7q t 2025-01-23 02:56:29.024 2025-01-23 02:56:29.024 6289647037426 3106 +\. + + +-- +-- Data for Name: MasterBank; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."MasterBank" (id, "namaBank", "namaAkun", norek, "isActive", "createdAt", "updatedAt") FROM stdin; +1 BRI Himpunan Pengusaha Muda Indonesia 9065456754325643 t 2025-01-23 02:59:24.286 2025-01-23 02:59:24.286 +2 BCA Himpunan Pengusaha Muda Indonesia 2304235678854332 t 2025-01-23 02:59:24.288 2025-01-23 02:59:24.288 +3 BNI Himpunan Pengusaha Muda Indonesia 1104786754324564 t 2025-01-23 02:59:24.289 2025-01-23 02:59:24.289 +4 BSI Himpunan Pengusaha Muda Indonesia 7076543567898976 t 2025-01-23 02:59:24.29 2025-01-23 02:59:24.29 +\. + + +-- +-- Data for Name: MasterBidangBisnis; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."MasterBidangBisnis" (id, name, active, "createdAt", "updatedAt") FROM stdin; +1 Software Developer t 2025-01-23 02:59:24.26 2025-01-23 02:59:24.26 +2 Makanan & Minuman t 2025-01-23 02:59:24.264 2025-01-23 02:59:24.264 +3 Kosmetik t 2025-01-23 02:59:24.265 2025-01-23 02:59:24.265 +4 Mesin Mobil t 2025-01-23 02:59:24.266 2025-01-23 02:59:24.266 +5 Rental Kendaraan t 2025-01-23 02:59:24.267 2025-01-23 02:59:24.267 +6 Kedokteran t 2025-01-23 02:59:24.268 2025-01-23 02:59:24.268 +\. + + +-- +-- Data for Name: MasterKategoriApp; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."MasterKategoriApp" (id, "isActive", "createdAt", "updatedAt", name, value) FROM stdin; +1 t 2025-01-23 02:59:24.383 2025-01-23 02:59:24.383 Event \N +2 t 2025-01-23 02:59:24.387 2025-01-23 02:59:24.387 Job \N +3 t 2025-01-23 02:59:24.387 2025-01-23 02:59:24.387 Voting \N +4 t 2025-01-23 02:59:24.388 2025-01-23 02:59:24.388 Donasi \N +5 t 2025-01-23 02:59:24.389 2025-01-23 02:59:24.389 Investasi \N +6 t 2025-01-23 02:59:24.39 2025-01-23 02:59:24.39 Forum \N +7 t 2025-01-23 02:59:24.391 2025-01-23 02:59:24.391 Collaboration \N +\. + + +-- +-- Data for Name: MasterPembagianDeviden; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."MasterPembagianDeviden" (id, name, active, "createdAt", "updatedAt") FROM stdin; +1 3 t 2025-01-23 02:59:24.275 2025-01-23 02:59:24.275 +2 6 t 2025-01-23 02:59:24.277 2025-01-23 02:59:24.277 +3 9 t 2025-01-23 02:59:24.278 2025-01-23 02:59:24.278 +4 12 t 2025-01-23 02:59:24.279 2025-01-23 02:59:24.279 +\. + + +-- +-- Data for Name: MasterPencarianInvestor; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."MasterPencarianInvestor" (id, name, active, "createdAt", "updatedAt") FROM stdin; +1 30 t 2025-01-23 02:59:24.269 2025-01-23 02:59:24.269 +2 60 t 2025-01-23 02:59:24.273 2025-01-23 02:59:24.273 +3 90 t 2025-01-23 02:59:24.274 2025-01-23 02:59:24.274 +4 120 t 2025-01-23 02:59:24.274 2025-01-23 02:59:24.274 +\. + + +-- +-- Data for Name: MasterPeriodeDeviden; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."MasterPeriodeDeviden" (id, name, active, "createdAt", "updatedAt") FROM stdin; +1 Selamanya t 2025-01-23 02:59:24.279 2025-01-23 02:59:24.279 +2 Satu tahun t 2025-01-23 02:59:24.281 2025-01-23 02:59:24.281 +\. + + +-- +-- Data for Name: MasterProgresInvestasi; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."MasterProgresInvestasi" (id, name, active, "createdAt", "updatedAt") FROM stdin; +1 Dalam Proses t 2025-01-23 02:59:24.296 2025-01-23 02:59:24.296 +2 Selesai t 2025-01-23 02:59:24.298 2025-01-23 02:59:24.298 +3 Waktu Habis t 2025-01-23 02:59:24.299 2025-01-23 02:59:24.299 +\. + + +-- +-- Data for Name: MasterStatus; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."MasterStatus" (id, name, "isActive", "createdAt", "updatedAt") FROM stdin; +1 Publish t 2025-01-23 02:59:24.339 2025-01-23 02:59:24.339 +2 Review t 2025-01-23 02:59:24.341 2025-01-23 02:59:24.341 +3 Draft t 2025-01-23 02:59:24.342 2025-01-23 02:59:24.342 +4 Reject t 2025-01-23 02:59:24.343 2025-01-23 02:59:24.343 +\. + + +-- +-- Data for Name: MasterStatusInvestasi; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."MasterStatusInvestasi" (id, name, color, active, "createdAt", "updatedAt") FROM stdin; +1 Publish green t 2025-01-23 02:59:24.282 2025-01-23 02:59:24.282 +2 Review orange t 2025-01-23 02:59:24.283 2025-01-23 02:59:24.283 +3 Draft yellow t 2025-01-23 02:59:24.284 2025-01-23 02:59:24.284 +4 Reject red t 2025-01-23 02:59:24.285 2025-01-23 02:59:24.285 +\. + + +-- +-- Data for Name: MasterStatusTransaksiInvestasi; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."MasterStatusTransaksiInvestasi" (id, name, color, active, "createdAt", "updatedAt") FROM stdin; +1 Menunggu yellow t 2025-01-23 02:59:24.291 2025-01-23 02:59:24.291 +2 Proses orange t 2025-01-23 02:59:24.294 2025-01-23 02:59:24.294 +3 Berhasil green t 2025-01-23 02:59:24.295 2025-01-23 02:59:24.295 +4 Gagal red t 2025-01-23 02:59:24.295 2025-01-23 02:59:24.295 +\. + + +-- +-- Data for Name: MasterUserRole; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."MasterUserRole" (id, name, active, "createdAt", "updatedAt") FROM stdin; +1 User t 2025-01-23 02:59:24.231 2025-01-23 02:59:24.231 +2 Admin t 2025-01-23 02:59:24.251 2025-01-23 02:59:24.251 +3 Super Admin t 2025-01-23 02:59:24.254 2025-01-23 02:59:24.254 +\. + + +-- +-- Data for Name: NomorAdmin; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."NomorAdmin" (id, "isActive", "createdAt", "updatedAt", nomor) FROM stdin; +Nomor-Admin-1234 t 2025-01-23 02:59:24.382 2025-01-23 02:59:24.382 6289697338821 +\. + + +-- +-- Data for Name: Notifikasi; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Notifikasi" (id, "isActive", "createdAt", "updatedAt", "isRead", "appId", "kategoriApp", pesan, title, status, "userRoleId", "userId", "adminId") FROM stdin; +\. + + +-- +-- Data for Name: Portofolio; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Portofolio" (id, "id_Portofolio", "namaBisnis", "alamatKantor", tlpn, deskripsi, active, "createdAt", "updatedAt", "profileId", "masterBidangBisnisId", "logoId") FROM stdin; +\. + + +-- +-- Data for Name: Portofolio_MediaSosial; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Portofolio_MediaSosial" (id, facebook, twitter, instagram, tiktok, youtube, active, "createdAt", "updatedAt", "portofolioId") FROM stdin; +\. + + +-- +-- Data for Name: Profile; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Profile" (id, name, email, alamat, "jenisKelamin", active, "createdAt", "updatedAt", "userId", "imageId", "imageBackgroundId") FROM stdin; +\. + + +-- +-- Data for Name: ProjectCollaboration; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."ProjectCollaboration" (id, "isActive", "createdAt", "updatedAt", title, lokasi, purpose, benefit, "isReject", report, "projectCollaborationMaster_IndustriId", "userId", "projectCollaborationMaster_StatusId") FROM stdin; +\. + + +-- +-- Data for Name: ProjectCollaborationMaster_Industri; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."ProjectCollaborationMaster_Industri" (id, "isActive", "createdAt", "updatedAt", name) FROM stdin; +1 t 2025-01-23 02:59:24.363 2025-01-23 02:59:24.363 Software Developer +2 t 2025-01-23 02:59:24.368 2025-01-23 02:59:24.368 Makanan & Minuman +3 t 2025-01-23 02:59:24.37 2025-01-23 02:59:24.37 Kosmetik +4 t 2025-01-23 02:59:24.371 2025-01-23 02:59:24.371 Furniture +5 t 2025-01-23 02:59:24.373 2025-01-23 02:59:24.373 Kendaraan +6 t 2025-01-23 02:59:24.374 2025-01-23 02:59:24.374 Kesehatan +\. + + +-- +-- Data for Name: ProjectCollaborationMaster_Status; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."ProjectCollaborationMaster_Status" (id, name, "isActive", "createdAt", "updatedAt") FROM stdin; +1 Publish t 2025-01-23 02:59:24.376 2025-01-23 02:59:24.376 +2 Review t 2025-01-23 02:59:24.379 2025-01-23 02:59:24.379 +3 Reject t 2025-01-23 02:59:24.38 2025-01-23 02:59:24.38 +\. + + +-- +-- Data for Name: ProjectCollaboration_AnggotaRoomChat; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."ProjectCollaboration_AnggotaRoomChat" (id, "isActive", "createdAt", "updatedAt", "userId", "projectCollaboration_RoomChatId") FROM stdin; +\. + + +-- +-- Data for Name: ProjectCollaboration_Message; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."ProjectCollaboration_Message" (id, "isActive", "createdAt", "updatedAt", message, "isFile", "userId", "projectCollaboration_RoomChatId") FROM stdin; +\. + + +-- +-- Data for Name: ProjectCollaboration_Notifikasi; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."ProjectCollaboration_Notifikasi" (id, "isActive", "createdAt", "updatedAt", "isRead", note, "projectCollaborationId", "adminId", "userId") FROM stdin; +\. + + +-- +-- Data for Name: ProjectCollaboration_Partisipasi; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."ProjectCollaboration_Partisipasi" (id, "isActive", "createdAt", "updatedAt", "userId", "projectCollaborationId", deskripsi_diri) FROM stdin; +\. + + +-- +-- Data for Name: ProjectCollaboration_RoomChat; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."ProjectCollaboration_RoomChat" (id, name, "isActive", "createdAt", "updatedAt", "userId", "projectCollaborationId") FROM stdin; +\. + + +-- +-- Data for Name: ProspektusInvestasi; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."ProspektusInvestasi" (id, url, active, "createdAt", "updatedAt", "investasiId", "fileId", title) FROM stdin; +\. + + +-- +-- Data for Name: TransaksiInvestasi; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."TransaksiInvestasi" (id, "investasiId", "authorId", "namaBank", "nomorRekening", token, redirect_url, quantity, price, gross_amount, merchant_name, status_code, status_message, transaction_id, order_id, payment_type, transaction_time, transaction_status, fraud_status, pdf_url, finish_redirect_url, active, "createdAt", "updatedAt", "masterStatusTransaksiInvestasiId") FROM stdin; +\. + + +-- +-- Data for Name: User; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."User" (id, active, "createdAt", "masterUserRoleId", nomor, "updatedAt", username) FROM stdin; +cm68qvb3300018vfy1n5b0yxd t 2025-01-23 02:59:24.255 3 6282340374412 2025-01-23 02:59:24.255 bagas_admin +cm68qvb3700038vfy8nucraat t 2025-01-23 02:59:24.259 2 628123833845 2025-01-23 02:59:24.259 fahmi_admin +cm68qvb3700038vfy8nucraatc t 2025-01-23 02:59:24.259 2 6281238338454 2025-01-23 02:59:24.259 fahmi_adminx +\. + + +-- +-- Data for Name: UserSession; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."UserSession" (id, token, expires, active, "createdAt", "updatedAt", "userId") FROM stdin; +\. + + +-- +-- Data for Name: Voting; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Voting" (id, "isActive", "createdAt", "updatedAt", "isArsip", title, deskripsi, "awalVote", "akhirVote", catatan, "authorId", "voting_StatusId") FROM stdin; +\. + + +-- +-- Data for Name: Voting_DaftarNamaVote; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Voting_DaftarNamaVote" (id, value, jumlah, "isActive", "createdAt", "updatedAt", "votingId") FROM stdin; +\. + + +-- +-- Data for Name: Voting_Kontributor; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Voting_Kontributor" (id, "isActive", "createdAt", "updatedAt", "votingId", "authorId", "voting_DaftarNamaVoteId") FROM stdin; +\. + + +-- +-- Data for Name: Voting_Status; Type: TABLE DATA; Schema: public; Owner: bip +-- + +COPY public."Voting_Status" (id, name, "isActive", "createdAt", "updatedAt") FROM stdin; +1 Publish t 2025-01-23 02:59:24.335 2025-01-23 02:59:24.335 +2 Review t 2025-01-23 02:59:24.338 2025-01-23 02:59:24.338 +3 Draft t 2025-01-23 02:59:24.338 2025-01-23 02:59:24.338 +4 Reject t 2025-01-23 02:59:24.339 2025-01-23 02:59:24.339 +\. + + +-- +-- Name: EventMaster_TipeAcara_id_seq; Type: SEQUENCE SET; Schema: public; Owner: bip +-- + +SELECT pg_catalog.setval('public."EventMaster_TipeAcara_id_seq"', 1, false); + + +-- +-- Name: ForumMaster_KategoriReport_id_seq; Type: SEQUENCE SET; Schema: public; Owner: bip +-- + +SELECT pg_catalog.setval('public."ForumMaster_KategoriReport_id_seq"', 6, true); + + +-- +-- Name: ForumMaster_StatusPosting_id_seq; Type: SEQUENCE SET; Schema: public; Owner: bip +-- + +SELECT pg_catalog.setval('public."ForumMaster_StatusPosting_id_seq"', 2, true); + + +-- +-- Name: ProjectCollaborationMaster_Industri_id_seq; Type: SEQUENCE SET; Schema: public; Owner: bip +-- + +SELECT pg_catalog.setval('public."ProjectCollaborationMaster_Industri_id_seq"', 6, true); + + +-- +-- Name: ProjectCollaborationMaster_Status_id_seq; Type: SEQUENCE SET; Schema: public; Owner: bip +-- + +SELECT pg_catalog.setval('public."ProjectCollaborationMaster_Status_id_seq"', 3, true); + + +-- +-- Name: BeritaInvestasi BeritaInvestasi_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."BeritaInvestasi" + ADD CONSTRAINT "BeritaInvestasi_pkey" PRIMARY KEY (id); + + +-- +-- Name: BusinessMaps BusinessMaps_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."BusinessMaps" + ADD CONSTRAINT "BusinessMaps_pkey" PRIMARY KEY (id); + + +-- +-- Name: DokumenInvestasi DokumenInvestasi_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."DokumenInvestasi" + ADD CONSTRAINT "DokumenInvestasi_pkey" PRIMARY KEY (id); + + +-- +-- Name: DonasiMaster_Bank DonasiMaster_Bank_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."DonasiMaster_Bank" + ADD CONSTRAINT "DonasiMaster_Bank_pkey" PRIMARY KEY (id); + + +-- +-- Name: DonasiMaster_Durasi DonasiMaster_Durasi_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."DonasiMaster_Durasi" + ADD CONSTRAINT "DonasiMaster_Durasi_pkey" PRIMARY KEY (id); + + +-- +-- Name: DonasiMaster_Kategori DonasiMaster_Kategori_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."DonasiMaster_Kategori" + ADD CONSTRAINT "DonasiMaster_Kategori_pkey" PRIMARY KEY (id); + + +-- +-- Name: DonasiMaster_StatusDonasi DonasiMaster_StatusDonasi_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."DonasiMaster_StatusDonasi" + ADD CONSTRAINT "DonasiMaster_StatusDonasi_pkey" PRIMARY KEY (id); + + +-- +-- Name: DonasiMaster_StatusInvoice DonasiMaster_StatusInvoice_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."DonasiMaster_StatusInvoice" + ADD CONSTRAINT "DonasiMaster_StatusInvoice_pkey" PRIMARY KEY (id); + + +-- +-- Name: Donasi_Cerita Donasi_Cerita_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_Cerita" + ADD CONSTRAINT "Donasi_Cerita_pkey" PRIMARY KEY (id); + + +-- +-- Name: Donasi_Invoice Donasi_Invoice_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_Invoice" + ADD CONSTRAINT "Donasi_Invoice_pkey" PRIMARY KEY (id); + + +-- +-- Name: Donasi_Kabar Donasi_Kabar_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_Kabar" + ADD CONSTRAINT "Donasi_Kabar_pkey" PRIMARY KEY (id); + + +-- +-- Name: Donasi_Notif Donasi_Notif_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_Notif" + ADD CONSTRAINT "Donasi_Notif_pkey" PRIMARY KEY (id); + + +-- +-- Name: Donasi_PencairanDana Donasi_PencairanDana_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_PencairanDana" + ADD CONSTRAINT "Donasi_PencairanDana_pkey" PRIMARY KEY (id); + + +-- +-- Name: Donasi_TemporaryCreate Donasi_TemporaryCreate_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_TemporaryCreate" + ADD CONSTRAINT "Donasi_TemporaryCreate_pkey" PRIMARY KEY (id); + + +-- +-- Name: Donasi Donasi_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi" + ADD CONSTRAINT "Donasi_pkey" PRIMARY KEY (id); + + +-- +-- Name: EventMaster_Status EventMaster_Status_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."EventMaster_Status" + ADD CONSTRAINT "EventMaster_Status_pkey" PRIMARY KEY (id); + + +-- +-- Name: EventMaster_TipeAcara EventMaster_TipeAcara_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."EventMaster_TipeAcara" + ADD CONSTRAINT "EventMaster_TipeAcara_pkey" PRIMARY KEY (id); + + +-- +-- Name: EventSponsor EventSponsor_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."EventSponsor" + ADD CONSTRAINT "EventSponsor_pkey" PRIMARY KEY (id); + + +-- +-- Name: EventTransaksi EventTransaksi_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."EventTransaksi" + ADD CONSTRAINT "EventTransaksi_pkey" PRIMARY KEY (id); + + +-- +-- Name: Event_Peserta Event_Peserta_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Event_Peserta" + ADD CONSTRAINT "Event_Peserta_pkey" PRIMARY KEY (id); + + +-- +-- Name: Event Event_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Event" + ADD CONSTRAINT "Event_pkey" PRIMARY KEY (id); + + +-- +-- Name: ForumMaster_KategoriReport ForumMaster_KategoriReport_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ForumMaster_KategoriReport" + ADD CONSTRAINT "ForumMaster_KategoriReport_pkey" PRIMARY KEY (id); + + +-- +-- Name: ForumMaster_StatusPosting ForumMaster_StatusPosting_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ForumMaster_StatusPosting" + ADD CONSTRAINT "ForumMaster_StatusPosting_pkey" PRIMARY KEY (id); + + +-- +-- Name: Forum_Komentar Forum_Komentar_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Forum_Komentar" + ADD CONSTRAINT "Forum_Komentar_pkey" PRIMARY KEY (id); + + +-- +-- Name: Forum_Posting Forum_Posting_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Forum_Posting" + ADD CONSTRAINT "Forum_Posting_pkey" PRIMARY KEY (id); + + +-- +-- Name: Forum_ReportKomentar Forum_ReportKomentar_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Forum_ReportKomentar" + ADD CONSTRAINT "Forum_ReportKomentar_pkey" PRIMARY KEY (id); + + +-- +-- Name: Forum_ReportPosting Forum_ReportPosting_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Forum_ReportPosting" + ADD CONSTRAINT "Forum_ReportPosting_pkey" PRIMARY KEY (id); + + +-- +-- Name: Images Images_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Images" + ADD CONSTRAINT "Images_pkey" PRIMARY KEY (id); + + +-- +-- Name: InvestasiMaster_StatusInvoice InvestasiMaster_StatusInvoice_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."InvestasiMaster_StatusInvoice" + ADD CONSTRAINT "InvestasiMaster_StatusInvoice_pkey" PRIMARY KEY (id); + + +-- +-- Name: Investasi_Invoice Investasi_Invoice_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Investasi_Invoice" + ADD CONSTRAINT "Investasi_Invoice_pkey" PRIMARY KEY (id); + + +-- +-- Name: Investasi Investasi_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Investasi" + ADD CONSTRAINT "Investasi_pkey" PRIMARY KEY (id); + + +-- +-- Name: Job Job_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Job" + ADD CONSTRAINT "Job_pkey" PRIMARY KEY (id); + + +-- +-- Name: KodeOtp KodeOtp_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."KodeOtp" + ADD CONSTRAINT "KodeOtp_pkey" PRIMARY KEY (id); + + +-- +-- Name: MasterBank MasterBank_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."MasterBank" + ADD CONSTRAINT "MasterBank_pkey" PRIMARY KEY (id); + + +-- +-- Name: MasterBidangBisnis MasterBidangBisnis_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."MasterBidangBisnis" + ADD CONSTRAINT "MasterBidangBisnis_pkey" PRIMARY KEY (id); + + +-- +-- Name: MasterKategoriApp MasterKategoriApp_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."MasterKategoriApp" + ADD CONSTRAINT "MasterKategoriApp_pkey" PRIMARY KEY (id); + + +-- +-- Name: MasterPembagianDeviden MasterPembagianDeviden_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."MasterPembagianDeviden" + ADD CONSTRAINT "MasterPembagianDeviden_pkey" PRIMARY KEY (id); + + +-- +-- Name: MasterPencarianInvestor MasterPencarianInvestor_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."MasterPencarianInvestor" + ADD CONSTRAINT "MasterPencarianInvestor_pkey" PRIMARY KEY (id); + + +-- +-- Name: MasterPeriodeDeviden MasterPeriodeDeviden_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."MasterPeriodeDeviden" + ADD CONSTRAINT "MasterPeriodeDeviden_pkey" PRIMARY KEY (id); + + +-- +-- Name: MasterProgresInvestasi MasterProgresInvestasi_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."MasterProgresInvestasi" + ADD CONSTRAINT "MasterProgresInvestasi_pkey" PRIMARY KEY (id); + + +-- +-- Name: MasterStatusInvestasi MasterStatusInvestasi_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."MasterStatusInvestasi" + ADD CONSTRAINT "MasterStatusInvestasi_pkey" PRIMARY KEY (id); + + +-- +-- Name: MasterStatusTransaksiInvestasi MasterStatusTransaksiInvestasi_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."MasterStatusTransaksiInvestasi" + ADD CONSTRAINT "MasterStatusTransaksiInvestasi_pkey" PRIMARY KEY (id); + + +-- +-- Name: MasterStatus MasterStatus_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."MasterStatus" + ADD CONSTRAINT "MasterStatus_pkey" PRIMARY KEY (id); + + +-- +-- Name: MasterUserRole MasterUserRole_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."MasterUserRole" + ADD CONSTRAINT "MasterUserRole_pkey" PRIMARY KEY (id); + + +-- +-- Name: NomorAdmin NomorAdmin_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."NomorAdmin" + ADD CONSTRAINT "NomorAdmin_pkey" PRIMARY KEY (id); + + +-- +-- Name: Notifikasi Notifikasi_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Notifikasi" + ADD CONSTRAINT "Notifikasi_pkey" PRIMARY KEY (id); + + +-- +-- Name: Portofolio_MediaSosial Portofolio_MediaSosial_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Portofolio_MediaSosial" + ADD CONSTRAINT "Portofolio_MediaSosial_pkey" PRIMARY KEY (id); + + +-- +-- Name: Portofolio Portofolio_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Portofolio" + ADD CONSTRAINT "Portofolio_pkey" PRIMARY KEY (id); + + +-- +-- Name: Profile Profile_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Profile" + ADD CONSTRAINT "Profile_pkey" PRIMARY KEY (id); + + +-- +-- Name: ProjectCollaborationMaster_Industri ProjectCollaborationMaster_Industri_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaborationMaster_Industri" + ADD CONSTRAINT "ProjectCollaborationMaster_Industri_pkey" PRIMARY KEY (id); + + +-- +-- Name: ProjectCollaborationMaster_Status ProjectCollaborationMaster_Status_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaborationMaster_Status" + ADD CONSTRAINT "ProjectCollaborationMaster_Status_pkey" PRIMARY KEY (id); + + +-- +-- Name: ProjectCollaboration_AnggotaRoomChat ProjectCollaboration_AnggotaRoomChat_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration_AnggotaRoomChat" + ADD CONSTRAINT "ProjectCollaboration_AnggotaRoomChat_pkey" PRIMARY KEY (id); + + +-- +-- Name: ProjectCollaboration_Message ProjectCollaboration_Message_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration_Message" + ADD CONSTRAINT "ProjectCollaboration_Message_pkey" PRIMARY KEY (id); + + +-- +-- Name: ProjectCollaboration_Notifikasi ProjectCollaboration_Notifikasi_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration_Notifikasi" + ADD CONSTRAINT "ProjectCollaboration_Notifikasi_pkey" PRIMARY KEY (id); + + +-- +-- Name: ProjectCollaboration_Partisipasi ProjectCollaboration_Partisipasi_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration_Partisipasi" + ADD CONSTRAINT "ProjectCollaboration_Partisipasi_pkey" PRIMARY KEY (id); + + +-- +-- Name: ProjectCollaboration_RoomChat ProjectCollaboration_RoomChat_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration_RoomChat" + ADD CONSTRAINT "ProjectCollaboration_RoomChat_pkey" PRIMARY KEY (id); + + +-- +-- Name: ProjectCollaboration ProjectCollaboration_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration" + ADD CONSTRAINT "ProjectCollaboration_pkey" PRIMARY KEY (id); + + +-- +-- Name: ProspektusInvestasi ProspektusInvestasi_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProspektusInvestasi" + ADD CONSTRAINT "ProspektusInvestasi_pkey" PRIMARY KEY (id); + + +-- +-- Name: TransaksiInvestasi TransaksiInvestasi_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."TransaksiInvestasi" + ADD CONSTRAINT "TransaksiInvestasi_pkey" PRIMARY KEY (id); + + +-- +-- Name: UserSession UserSession_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."UserSession" + ADD CONSTRAINT "UserSession_pkey" PRIMARY KEY (id); + + +-- +-- Name: User User_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."User" + ADD CONSTRAINT "User_pkey" PRIMARY KEY (id); + + +-- +-- Name: Voting_DaftarNamaVote Voting_DaftarNamaVote_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Voting_DaftarNamaVote" + ADD CONSTRAINT "Voting_DaftarNamaVote_pkey" PRIMARY KEY (id); + + +-- +-- Name: Voting_Kontributor Voting_Kontributor_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Voting_Kontributor" + ADD CONSTRAINT "Voting_Kontributor_pkey" PRIMARY KEY (id); + + +-- +-- Name: Voting_Status Voting_Status_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Voting_Status" + ADD CONSTRAINT "Voting_Status_pkey" PRIMARY KEY (id); + + +-- +-- Name: Voting Voting_pkey; Type: CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Voting" + ADD CONSTRAINT "Voting_pkey" PRIMARY KEY (id); + + +-- +-- Name: BusinessMaps_portofolioId_key; Type: INDEX; Schema: public; Owner: bip +-- + +CREATE UNIQUE INDEX "BusinessMaps_portofolioId_key" ON public."BusinessMaps" USING btree ("portofolioId"); + + +-- +-- Name: Donasi_Cerita_donasiId_key; Type: INDEX; Schema: public; Owner: bip +-- + +CREATE UNIQUE INDEX "Donasi_Cerita_donasiId_key" ON public."Donasi_Cerita" USING btree ("donasiId"); + + +-- +-- Name: Donasi_Cerita_imagesId_key; Type: INDEX; Schema: public; Owner: bip +-- + +CREATE UNIQUE INDEX "Donasi_Cerita_imagesId_key" ON public."Donasi_Cerita" USING btree ("imagesId"); + + +-- +-- Name: Donasi_TemporaryCreate_imagesId_key; Type: INDEX; Schema: public; Owner: bip +-- + +CREATE UNIQUE INDEX "Donasi_TemporaryCreate_imagesId_key" ON public."Donasi_TemporaryCreate" USING btree ("imagesId"); + + +-- +-- Name: Donasi_imagesId_key; Type: INDEX; Schema: public; Owner: bip +-- + +CREATE UNIQUE INDEX "Donasi_imagesId_key" ON public."Donasi" USING btree ("imagesId"); + + +-- +-- Name: EventTransaksi_eventSponsorId_key; Type: INDEX; Schema: public; Owner: bip +-- + +CREATE UNIQUE INDEX "EventTransaksi_eventSponsorId_key" ON public."EventTransaksi" USING btree ("eventSponsorId"); + + +-- +-- Name: Investasi_imagesId_key; Type: INDEX; Schema: public; Owner: bip +-- + +CREATE UNIQUE INDEX "Investasi_imagesId_key" ON public."Investasi" USING btree ("imagesId"); + + +-- +-- Name: Portofolio_MediaSosial_portofolioId_key; Type: INDEX; Schema: public; Owner: bip +-- + +CREATE UNIQUE INDEX "Portofolio_MediaSosial_portofolioId_key" ON public."Portofolio_MediaSosial" USING btree ("portofolioId"); + + +-- +-- Name: Portofolio_id_Portofolio_key; Type: INDEX; Schema: public; Owner: bip +-- + +CREATE UNIQUE INDEX "Portofolio_id_Portofolio_key" ON public."Portofolio" USING btree ("id_Portofolio"); + + +-- +-- Name: Profile_email_key; Type: INDEX; Schema: public; Owner: bip +-- + +CREATE UNIQUE INDEX "Profile_email_key" ON public."Profile" USING btree (email); + + +-- +-- Name: Profile_userId_key; Type: INDEX; Schema: public; Owner: bip +-- + +CREATE UNIQUE INDEX "Profile_userId_key" ON public."Profile" USING btree ("userId"); + + +-- +-- Name: ProspektusInvestasi_investasiId_key; Type: INDEX; Schema: public; Owner: bip +-- + +CREATE UNIQUE INDEX "ProspektusInvestasi_investasiId_key" ON public."ProspektusInvestasi" USING btree ("investasiId"); + + +-- +-- Name: UserSession_userId_key; Type: INDEX; Schema: public; Owner: bip +-- + +CREATE UNIQUE INDEX "UserSession_userId_key" ON public."UserSession" USING btree ("userId"); + + +-- +-- Name: User_nomor_key; Type: INDEX; Schema: public; Owner: bip +-- + +CREATE UNIQUE INDEX "User_nomor_key" ON public."User" USING btree (nomor); + + +-- +-- Name: User_username_key; Type: INDEX; Schema: public; Owner: bip +-- + +CREATE UNIQUE INDEX "User_username_key" ON public."User" USING btree (username); + + +-- +-- Name: ProjectCollaboration_Notifikasi AdminNotifProjectUser; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration_Notifikasi" + ADD CONSTRAINT "AdminNotifProjectUser" FOREIGN KEY ("adminId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: BeritaInvestasi BeritaInvestasi_imagesId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."BeritaInvestasi" + ADD CONSTRAINT "BeritaInvestasi_imagesId_fkey" FOREIGN KEY ("imagesId") REFERENCES public."Images"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: BeritaInvestasi BeritaInvestasi_investasiId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."BeritaInvestasi" + ADD CONSTRAINT "BeritaInvestasi_investasiId_fkey" FOREIGN KEY ("investasiId") REFERENCES public."Investasi"(id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: BusinessMaps BusinessMaps_authorId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."BusinessMaps" + ADD CONSTRAINT "BusinessMaps_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: BusinessMaps BusinessMaps_portofolioId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."BusinessMaps" + ADD CONSTRAINT "BusinessMaps_portofolioId_fkey" FOREIGN KEY ("portofolioId") REFERENCES public."Portofolio"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: DokumenInvestasi DokumenInvestasi_investasiId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."DokumenInvestasi" + ADD CONSTRAINT "DokumenInvestasi_investasiId_fkey" FOREIGN KEY ("investasiId") REFERENCES public."Investasi"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi_Cerita Donasi_Cerita_donasiId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_Cerita" + ADD CONSTRAINT "Donasi_Cerita_donasiId_fkey" FOREIGN KEY ("donasiId") REFERENCES public."Donasi"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi_Cerita Donasi_Cerita_imagesId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_Cerita" + ADD CONSTRAINT "Donasi_Cerita_imagesId_fkey" FOREIGN KEY ("imagesId") REFERENCES public."Images"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi_Invoice Donasi_Invoice_authorId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_Invoice" + ADD CONSTRAINT "Donasi_Invoice_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi_Invoice Donasi_Invoice_donasiId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_Invoice" + ADD CONSTRAINT "Donasi_Invoice_donasiId_fkey" FOREIGN KEY ("donasiId") REFERENCES public."Donasi"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi_Invoice Donasi_Invoice_donasiMaster_BankId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_Invoice" + ADD CONSTRAINT "Donasi_Invoice_donasiMaster_BankId_fkey" FOREIGN KEY ("donasiMaster_BankId") REFERENCES public."DonasiMaster_Bank"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi_Invoice Donasi_Invoice_donasiMaster_StatusInvoiceId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_Invoice" + ADD CONSTRAINT "Donasi_Invoice_donasiMaster_StatusInvoiceId_fkey" FOREIGN KEY ("donasiMaster_StatusInvoiceId") REFERENCES public."DonasiMaster_StatusInvoice"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi_Invoice Donasi_Invoice_imagesId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_Invoice" + ADD CONSTRAINT "Donasi_Invoice_imagesId_fkey" FOREIGN KEY ("imagesId") REFERENCES public."Images"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi_Kabar Donasi_Kabar_donasiId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_Kabar" + ADD CONSTRAINT "Donasi_Kabar_donasiId_fkey" FOREIGN KEY ("donasiId") REFERENCES public."Donasi"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi_Kabar Donasi_Kabar_imagesId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_Kabar" + ADD CONSTRAINT "Donasi_Kabar_imagesId_fkey" FOREIGN KEY ("imagesId") REFERENCES public."Images"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi_Notif Donasi_Notif_donasi_KabarId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_Notif" + ADD CONSTRAINT "Donasi_Notif_donasi_KabarId_fkey" FOREIGN KEY ("donasi_KabarId") REFERENCES public."Donasi_Kabar"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi_Notif Donasi_Notif_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_Notif" + ADD CONSTRAINT "Donasi_Notif_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi_PencairanDana Donasi_PencairanDana_donasiId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_PencairanDana" + ADD CONSTRAINT "Donasi_PencairanDana_donasiId_fkey" FOREIGN KEY ("donasiId") REFERENCES public."Donasi"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi_PencairanDana Donasi_PencairanDana_imagesId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_PencairanDana" + ADD CONSTRAINT "Donasi_PencairanDana_imagesId_fkey" FOREIGN KEY ("imagesId") REFERENCES public."Images"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi_TemporaryCreate Donasi_TemporaryCreate_donasiMaster_DurasiId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_TemporaryCreate" + ADD CONSTRAINT "Donasi_TemporaryCreate_donasiMaster_DurasiId_fkey" FOREIGN KEY ("donasiMaster_DurasiId") REFERENCES public."DonasiMaster_Durasi"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi_TemporaryCreate Donasi_TemporaryCreate_donasiMaster_KategoriId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_TemporaryCreate" + ADD CONSTRAINT "Donasi_TemporaryCreate_donasiMaster_KategoriId_fkey" FOREIGN KEY ("donasiMaster_KategoriId") REFERENCES public."DonasiMaster_Kategori"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi_TemporaryCreate Donasi_TemporaryCreate_imagesId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi_TemporaryCreate" + ADD CONSTRAINT "Donasi_TemporaryCreate_imagesId_fkey" FOREIGN KEY ("imagesId") REFERENCES public."Images"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi Donasi_authorId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi" + ADD CONSTRAINT "Donasi_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi Donasi_donasiMaster_DurasiId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi" + ADD CONSTRAINT "Donasi_donasiMaster_DurasiId_fkey" FOREIGN KEY ("donasiMaster_DurasiId") REFERENCES public."DonasiMaster_Durasi"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi Donasi_donasiMaster_KategoriId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi" + ADD CONSTRAINT "Donasi_donasiMaster_KategoriId_fkey" FOREIGN KEY ("donasiMaster_KategoriId") REFERENCES public."DonasiMaster_Kategori"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi Donasi_donasiMaster_StatusDonasiId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi" + ADD CONSTRAINT "Donasi_donasiMaster_StatusDonasiId_fkey" FOREIGN KEY ("donasiMaster_StatusDonasiId") REFERENCES public."DonasiMaster_StatusDonasi"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Donasi Donasi_imagesId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Donasi" + ADD CONSTRAINT "Donasi_imagesId_fkey" FOREIGN KEY ("imagesId") REFERENCES public."Images"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: EventSponsor EventSponsor_auhtorId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."EventSponsor" + ADD CONSTRAINT "EventSponsor_auhtorId_fkey" FOREIGN KEY ("auhtorId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: EventSponsor EventSponsor_eventId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."EventSponsor" + ADD CONSTRAINT "EventSponsor_eventId_fkey" FOREIGN KEY ("eventId") REFERENCES public."Event"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: EventTransaksi EventTransaksi_authorId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."EventTransaksi" + ADD CONSTRAINT "EventTransaksi_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: EventTransaksi EventTransaksi_eventId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."EventTransaksi" + ADD CONSTRAINT "EventTransaksi_eventId_fkey" FOREIGN KEY ("eventId") REFERENCES public."Event"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: EventTransaksi EventTransaksi_eventSponsorId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."EventTransaksi" + ADD CONSTRAINT "EventTransaksi_eventSponsorId_fkey" FOREIGN KEY ("eventSponsorId") REFERENCES public."EventSponsor"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: EventTransaksi EventTransaksi_masterBankId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."EventTransaksi" + ADD CONSTRAINT "EventTransaksi_masterBankId_fkey" FOREIGN KEY ("masterBankId") REFERENCES public."MasterBank"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Event_Peserta Event_Peserta_eventId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Event_Peserta" + ADD CONSTRAINT "Event_Peserta_eventId_fkey" FOREIGN KEY ("eventId") REFERENCES public."Event"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Event_Peserta Event_Peserta_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Event_Peserta" + ADD CONSTRAINT "Event_Peserta_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Event Event_authorId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Event" + ADD CONSTRAINT "Event_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Event Event_eventMaster_StatusId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Event" + ADD CONSTRAINT "Event_eventMaster_StatusId_fkey" FOREIGN KEY ("eventMaster_StatusId") REFERENCES public."EventMaster_Status"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Event Event_eventMaster_TipeAcaraId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Event" + ADD CONSTRAINT "Event_eventMaster_TipeAcaraId_fkey" FOREIGN KEY ("eventMaster_TipeAcaraId") REFERENCES public."EventMaster_TipeAcara"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Forum_Komentar Forum_Komentar_authorId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Forum_Komentar" + ADD CONSTRAINT "Forum_Komentar_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Forum_Komentar Forum_Komentar_forum_PostingId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Forum_Komentar" + ADD CONSTRAINT "Forum_Komentar_forum_PostingId_fkey" FOREIGN KEY ("forum_PostingId") REFERENCES public."Forum_Posting"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Forum_Posting Forum_Posting_authorId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Forum_Posting" + ADD CONSTRAINT "Forum_Posting_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Forum_Posting Forum_Posting_forumMaster_StatusPostingId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Forum_Posting" + ADD CONSTRAINT "Forum_Posting_forumMaster_StatusPostingId_fkey" FOREIGN KEY ("forumMaster_StatusPostingId") REFERENCES public."ForumMaster_StatusPosting"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Forum_ReportKomentar Forum_ReportKomentar_forumMaster_KategoriReportId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Forum_ReportKomentar" + ADD CONSTRAINT "Forum_ReportKomentar_forumMaster_KategoriReportId_fkey" FOREIGN KEY ("forumMaster_KategoriReportId") REFERENCES public."ForumMaster_KategoriReport"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Forum_ReportKomentar Forum_ReportKomentar_forum_KomentarId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Forum_ReportKomentar" + ADD CONSTRAINT "Forum_ReportKomentar_forum_KomentarId_fkey" FOREIGN KEY ("forum_KomentarId") REFERENCES public."Forum_Komentar"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Forum_ReportKomentar Forum_ReportKomentar_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Forum_ReportKomentar" + ADD CONSTRAINT "Forum_ReportKomentar_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Forum_ReportPosting Forum_ReportPosting_forumMaster_KategoriReportId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Forum_ReportPosting" + ADD CONSTRAINT "Forum_ReportPosting_forumMaster_KategoriReportId_fkey" FOREIGN KEY ("forumMaster_KategoriReportId") REFERENCES public."ForumMaster_KategoriReport"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Forum_ReportPosting Forum_ReportPosting_forum_PostingId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Forum_ReportPosting" + ADD CONSTRAINT "Forum_ReportPosting_forum_PostingId_fkey" FOREIGN KEY ("forum_PostingId") REFERENCES public."Forum_Posting"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Forum_ReportPosting Forum_ReportPosting_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Forum_ReportPosting" + ADD CONSTRAINT "Forum_ReportPosting_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Investasi_Invoice Investasi_Invoice_authorId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Investasi_Invoice" + ADD CONSTRAINT "Investasi_Invoice_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Investasi_Invoice Investasi_Invoice_imagesId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Investasi_Invoice" + ADD CONSTRAINT "Investasi_Invoice_imagesId_fkey" FOREIGN KEY ("imagesId") REFERENCES public."Images"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Investasi_Invoice Investasi_Invoice_investasiId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Investasi_Invoice" + ADD CONSTRAINT "Investasi_Invoice_investasiId_fkey" FOREIGN KEY ("investasiId") REFERENCES public."Investasi"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Investasi_Invoice Investasi_Invoice_masterBankId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Investasi_Invoice" + ADD CONSTRAINT "Investasi_Invoice_masterBankId_fkey" FOREIGN KEY ("masterBankId") REFERENCES public."MasterBank"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Investasi_Invoice Investasi_Invoice_statusInvoiceId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Investasi_Invoice" + ADD CONSTRAINT "Investasi_Invoice_statusInvoiceId_fkey" FOREIGN KEY ("statusInvoiceId") REFERENCES public."InvestasiMaster_StatusInvoice"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Investasi Investasi_authorId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Investasi" + ADD CONSTRAINT "Investasi_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Investasi Investasi_imagesId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Investasi" + ADD CONSTRAINT "Investasi_imagesId_fkey" FOREIGN KEY ("imagesId") REFERENCES public."Images"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Investasi Investasi_masterPembagianDevidenId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Investasi" + ADD CONSTRAINT "Investasi_masterPembagianDevidenId_fkey" FOREIGN KEY ("masterPembagianDevidenId") REFERENCES public."MasterPembagianDeviden"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Investasi Investasi_masterPencarianInvestorId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Investasi" + ADD CONSTRAINT "Investasi_masterPencarianInvestorId_fkey" FOREIGN KEY ("masterPencarianInvestorId") REFERENCES public."MasterPencarianInvestor"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Investasi Investasi_masterPeriodeDevidenId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Investasi" + ADD CONSTRAINT "Investasi_masterPeriodeDevidenId_fkey" FOREIGN KEY ("masterPeriodeDevidenId") REFERENCES public."MasterPeriodeDeviden"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Investasi Investasi_masterProgresInvestasiId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Investasi" + ADD CONSTRAINT "Investasi_masterProgresInvestasiId_fkey" FOREIGN KEY ("masterProgresInvestasiId") REFERENCES public."MasterProgresInvestasi"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Investasi Investasi_masterStatusInvestasiId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Investasi" + ADD CONSTRAINT "Investasi_masterStatusInvestasiId_fkey" FOREIGN KEY ("masterStatusInvestasiId") REFERENCES public."MasterStatusInvestasi"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Job Job_authorId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Job" + ADD CONSTRAINT "Job_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Job Job_masterStatusId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Job" + ADD CONSTRAINT "Job_masterStatusId_fkey" FOREIGN KEY ("masterStatusId") REFERENCES public."MasterStatus"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Notifikasi NotifikasiAdmin; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Notifikasi" + ADD CONSTRAINT "NotifikasiAdmin" FOREIGN KEY ("adminId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Notifikasi NotifikasiUser; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Notifikasi" + ADD CONSTRAINT "NotifikasiUser" FOREIGN KEY ("userId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Notifikasi Notifikasi_userRoleId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Notifikasi" + ADD CONSTRAINT "Notifikasi_userRoleId_fkey" FOREIGN KEY ("userRoleId") REFERENCES public."MasterUserRole"(id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: Portofolio_MediaSosial Portofolio_MediaSosial_portofolioId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Portofolio_MediaSosial" + ADD CONSTRAINT "Portofolio_MediaSosial_portofolioId_fkey" FOREIGN KEY ("portofolioId") REFERENCES public."Portofolio"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Portofolio Portofolio_masterBidangBisnisId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Portofolio" + ADD CONSTRAINT "Portofolio_masterBidangBisnisId_fkey" FOREIGN KEY ("masterBidangBisnisId") REFERENCES public."MasterBidangBisnis"(id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: Portofolio Portofolio_profileId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Portofolio" + ADD CONSTRAINT "Portofolio_profileId_fkey" FOREIGN KEY ("profileId") REFERENCES public."Profile"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Profile Profile_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Profile" + ADD CONSTRAINT "Profile_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: ProjectCollaboration_AnggotaRoomChat ProjectCollaboration_AnggotaRoomChat_projectCollaboration__fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration_AnggotaRoomChat" + ADD CONSTRAINT "ProjectCollaboration_AnggotaRoomChat_projectCollaboration__fkey" FOREIGN KEY ("projectCollaboration_RoomChatId") REFERENCES public."ProjectCollaboration_RoomChat"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: ProjectCollaboration_AnggotaRoomChat ProjectCollaboration_AnggotaRoomChat_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration_AnggotaRoomChat" + ADD CONSTRAINT "ProjectCollaboration_AnggotaRoomChat_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: ProjectCollaboration_Message ProjectCollaboration_Message_projectCollaboration_RoomChat_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration_Message" + ADD CONSTRAINT "ProjectCollaboration_Message_projectCollaboration_RoomChat_fkey" FOREIGN KEY ("projectCollaboration_RoomChatId") REFERENCES public."ProjectCollaboration_RoomChat"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: ProjectCollaboration_Message ProjectCollaboration_Message_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration_Message" + ADD CONSTRAINT "ProjectCollaboration_Message_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: ProjectCollaboration_Notifikasi ProjectCollaboration_Notifikasi_projectCollaborationId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration_Notifikasi" + ADD CONSTRAINT "ProjectCollaboration_Notifikasi_projectCollaborationId_fkey" FOREIGN KEY ("projectCollaborationId") REFERENCES public."ProjectCollaboration"(id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: ProjectCollaboration_Partisipasi ProjectCollaboration_Partisipasi_projectCollaborationId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration_Partisipasi" + ADD CONSTRAINT "ProjectCollaboration_Partisipasi_projectCollaborationId_fkey" FOREIGN KEY ("projectCollaborationId") REFERENCES public."ProjectCollaboration"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: ProjectCollaboration_Partisipasi ProjectCollaboration_Partisipasi_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration_Partisipasi" + ADD CONSTRAINT "ProjectCollaboration_Partisipasi_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: ProjectCollaboration_RoomChat ProjectCollaboration_RoomChat_projectCollaborationId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration_RoomChat" + ADD CONSTRAINT "ProjectCollaboration_RoomChat_projectCollaborationId_fkey" FOREIGN KEY ("projectCollaborationId") REFERENCES public."ProjectCollaboration"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: ProjectCollaboration_RoomChat ProjectCollaboration_RoomChat_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration_RoomChat" + ADD CONSTRAINT "ProjectCollaboration_RoomChat_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: ProjectCollaboration ProjectCollaboration_projectCollaborationMaster_IndustriId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration" + ADD CONSTRAINT "ProjectCollaboration_projectCollaborationMaster_IndustriId_fkey" FOREIGN KEY ("projectCollaborationMaster_IndustriId") REFERENCES public."ProjectCollaborationMaster_Industri"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: ProjectCollaboration ProjectCollaboration_projectCollaborationMaster_StatusId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration" + ADD CONSTRAINT "ProjectCollaboration_projectCollaborationMaster_StatusId_fkey" FOREIGN KEY ("projectCollaborationMaster_StatusId") REFERENCES public."ProjectCollaborationMaster_Status"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: ProjectCollaboration ProjectCollaboration_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration" + ADD CONSTRAINT "ProjectCollaboration_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: ProspektusInvestasi ProspektusInvestasi_investasiId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProspektusInvestasi" + ADD CONSTRAINT "ProspektusInvestasi_investasiId_fkey" FOREIGN KEY ("investasiId") REFERENCES public."Investasi"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: TransaksiInvestasi TransaksiInvestasi_authorId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."TransaksiInvestasi" + ADD CONSTRAINT "TransaksiInvestasi_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: TransaksiInvestasi TransaksiInvestasi_investasiId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."TransaksiInvestasi" + ADD CONSTRAINT "TransaksiInvestasi_investasiId_fkey" FOREIGN KEY ("investasiId") REFERENCES public."Investasi"(id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: TransaksiInvestasi TransaksiInvestasi_masterStatusTransaksiInvestasiId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."TransaksiInvestasi" + ADD CONSTRAINT "TransaksiInvestasi_masterStatusTransaksiInvestasiId_fkey" FOREIGN KEY ("masterStatusTransaksiInvestasiId") REFERENCES public."MasterStatusTransaksiInvestasi"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: ProjectCollaboration_Notifikasi UserNotifProjectUser; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."ProjectCollaboration_Notifikasi" + ADD CONSTRAINT "UserNotifProjectUser" FOREIGN KEY ("userId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: UserSession UserSession_userId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."UserSession" + ADD CONSTRAINT "UserSession_userId_fkey" FOREIGN KEY ("userId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: User User_masterUserRoleId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."User" + ADD CONSTRAINT "User_masterUserRoleId_fkey" FOREIGN KEY ("masterUserRoleId") REFERENCES public."MasterUserRole"(id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: Voting_DaftarNamaVote Voting_DaftarNamaVote_votingId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Voting_DaftarNamaVote" + ADD CONSTRAINT "Voting_DaftarNamaVote_votingId_fkey" FOREIGN KEY ("votingId") REFERENCES public."Voting"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Voting_Kontributor Voting_Kontributor_authorId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Voting_Kontributor" + ADD CONSTRAINT "Voting_Kontributor_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Voting_Kontributor Voting_Kontributor_votingId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Voting_Kontributor" + ADD CONSTRAINT "Voting_Kontributor_votingId_fkey" FOREIGN KEY ("votingId") REFERENCES public."Voting"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Voting_Kontributor Voting_Kontributor_voting_DaftarNamaVoteId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Voting_Kontributor" + ADD CONSTRAINT "Voting_Kontributor_voting_DaftarNamaVoteId_fkey" FOREIGN KEY ("voting_DaftarNamaVoteId") REFERENCES public."Voting_DaftarNamaVote"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- Name: Voting Voting_authorId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Voting" + ADD CONSTRAINT "Voting_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES public."User"(id) ON UPDATE CASCADE ON DELETE RESTRICT; + + +-- +-- Name: Voting Voting_voting_StatusId_fkey; Type: FK CONSTRAINT; Schema: public; Owner: bip +-- + +ALTER TABLE ONLY public."Voting" + ADD CONSTRAINT "Voting_voting_StatusId_fkey" FOREIGN KEY ("voting_StatusId") REFERENCES public."Voting_Status"(id) ON UPDATE CASCADE ON DELETE SET NULL; + + +-- +-- PostgreSQL database dump complete +-- + diff --git a/bun.lockb b/bun.lockb index 8d2a8fec..84d65b8f 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 5b97338f..299c56b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hipmi", - "version": "1.2.40", + "version": "1.2.42", "private": true, "prisma": { "seed": "bun prisma/seed.ts" @@ -28,7 +28,7 @@ "@mantine/next": "^6.0.17", "@mantine/notifications": "^6.0.17", "@mantine/tiptap": "^7.5.3", - "@prisma/client": "^5.0.0", + "@prisma/client": "^6.3.0", "@react-pdf/renderer": "^3.4.4", "@tabler/icons-react": "^2.38.0", "@tiptap/extension-highlight": "^2.2.3", @@ -69,9 +69,10 @@ "next": "^13.5.4-canary.8", "next-dev": "^1.1.9", "next-scroll-loader": "^1.0.9", + "p-limit": "^6.2.0", "pdfjs-dist": "^4.6.82", "postcss": "8.4.27", - "prisma": "^5.19.1", + "prisma": "^6.3.0", "react": "18.2.0", "react-countdown": "^2.3.5", "react-dom": "18.2.0", @@ -89,6 +90,7 @@ "react-toastify": "^9.1.3", "sharp": "^0.33.5", "socket.io-client": "^4.7.2", + "swr": "^2.3.0", "tailwindcss": "3.3.3", "ts-node": "^10.9.2", "typescript": "5.1.6", diff --git a/prisma/schema.prisma b/prisma/schema.prisma index bda6bd67..475ce30a 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -2,8 +2,9 @@ // learn more about it in the docs: https://pris.ly/d/prisma-schema generator client { - provider = "prisma-client-js" - engineType = "binary" + provider = "prisma-client-js" + engineType = "binary" + binaryTargets = ["native"] } datasource db { @@ -47,6 +48,9 @@ model User { User_Notifikasi Notifikasi[] @relation("UserNotifikasi") BusinessMaps BusinessMaps[] Investasi_Invoice Investasi_Invoice[] + + EventSponsor EventSponsor[] + EventTransaksi EventTransaksi[] } model MasterUserRole { @@ -166,6 +170,7 @@ model MasterBank { createdAt DateTime @default(now()) updatedAt DateTime @updatedAt Investasi_Invoice Investasi_Invoice[] + EventTransaksi EventTransaksi[] } model MasterStatus { @@ -177,6 +182,15 @@ model MasterStatus { Job Job[] } +model MasterStatusTransaksi { + id String @id @default(cuid()) + name String + isActive Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + EventTransaksi EventTransaksi[] +} + // -------------------- INVESTASI --------------------- // // Table investasi / saham model Investasi { @@ -593,6 +607,8 @@ model Event { Event_Peserta Event_Peserta[] EventMaster_TipeAcara EventMaster_TipeAcara? @relation(fields: [eventMaster_TipeAcaraId], references: [id]) eventMaster_TipeAcaraId Int? + EventSponsor EventSponsor[] + EventTransaksi EventTransaksi[] } model EventMaster_TipeAcara { @@ -952,3 +968,50 @@ model MasterKategoriApp { name String value String? } + +// ======================= EVENT ======================= // + +model EventSponsor { + id String @id @default(cuid()) + isActive Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + name String + isTransfer Boolean? @default(false) + fileName String + fileExt String? + fileId String + + Author User? @relation(fields: [authorId], references: [id]) + authorId String? + + Event Event? @relation(fields: [eventId], references: [id]) + eventId String? + + EventTransaksi EventTransaksi? +} + +model EventTransaksi { + id String @id @default(cuid()) + isActive Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + nominal Int + status String + transferImageId String? + + MasterBank MasterBank? @relation(fields: [masterBankId], references: [id]) + masterBankId String? + + AuthorId User? @relation(fields: [authorId], references: [id]) + authorId String? + + Event Event? @relation(fields: [eventId], references: [id]) + eventId String? + + EventSponsor EventSponsor? @relation(fields: [eventSponsorId], references: [id]) + eventSponsorId String? @unique + + MasterStatusTransaksi MasterStatusTransaksi? @relation(fields: [masterStatusTransaksiId], references: [id]) + masterStatusTransaksiId String? +} diff --git a/prisma/seed.ts b/prisma/seed.ts index b4eb2917..a6785401 100644 --- a/prisma/seed.ts +++ b/prisma/seed.ts @@ -2,15 +2,15 @@ import prisma from "./../src/app/lib/prisma"; import { generate_seeder } from "./../src/app_modules/_global/fun/generate_seeder"; (async () => { - console.log("start"); + console.log("start seeder >>"); await generate_seeder(); })() .then(() => { - console.log("success"); + console.log("<< success seeder"); process.exit(0); }) .catch((e) => { - console.error(e); + console.error("<< error seeder", e); process.exit(1); }) .finally(async () => { diff --git a/src/app/api/admin/donasi/dashboard/[name]/route.ts b/src/app/api/admin/donasi/dashboard/[name]/route.ts new file mode 100644 index 00000000..8b164d12 --- /dev/null +++ b/src/app/api/admin/donasi/dashboard/[name]/route.ts @@ -0,0 +1,50 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import { data } from "autoprefixer"; +import _ from "lodash"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request, { params }: { + params: { name: string } +}) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json({ + success: false, + message: "Method not allowed", + }, + { status: 405 } + ); + } + + const { name } = params; + try { + let fixData; + const fixStatus = _.startCase(name); + fixData = await prisma.donasi.count({ + where: { + DonasiMaster_Status: { + name: fixStatus + }, + } + }); + return NextResponse.json({ + success: true, + message: "Success get data donasi dashboard", + data: fixData + }, + { status: 200 } + ) + } catch (error) { + backendLogger.error("Error get data donasi dashboard >>", error); + return NextResponse.json({ + success: false, + message: "Failed to get data donasi dashboard", + reason: (error as Error).message + }, + { status: 500 } + ) + } finally { + await prisma.$disconnect(); + } +} diff --git a/src/app/api/admin/donasi/dashboard/kategori/route.ts b/src/app/api/admin/donasi/dashboard/kategori/route.ts new file mode 100644 index 00000000..ed0063d8 --- /dev/null +++ b/src/app/api/admin/donasi/dashboard/kategori/route.ts @@ -0,0 +1,39 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import _ from "lodash"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request) { + const method = request.method; + if (method !== 'GET') { + return NextResponse.json({ + success: false, + message: 'Method not allowed', + }, + { status: 405 } + ) + } + + try { + let fixData; + fixData = await prisma.donasiMaster_Kategori.count({}); + return NextResponse.json({ + success: true, + message: 'Success get data donasi dashboard', + data: fixData + }, + { status: 200 } + ) + } catch (error) { + backendLogger.error('Error get data donasi dashboard >>', error); + return NextResponse.json({ + success: false, + message: 'Error get data donasi dashboard', + reason: (error as Error).message + }, + { status: 500 } + ) + } finally { + await prisma.$disconnect(); + } +} \ No newline at end of file diff --git a/src/app/api/admin/event/[status]/route.ts b/src/app/api/admin/event/[status]/route.ts new file mode 100644 index 00000000..5c402e80 --- /dev/null +++ b/src/app/api/admin/event/[status]/route.ts @@ -0,0 +1,255 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import _ from "lodash"; +import moment from "moment"; +import { NextResponse } from "next/server"; + +export async function GET( + request: Request, + { params }: { params: { status: string } } +) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json( + { success: false, message: "Method not allowed" }, + { status: 405 } + ); + } + + const { status } = params; + const { searchParams } = new URL(request.url); + const search = searchParams.get("search"); + const page = searchParams.get("page"); + const takeData = 10; + const skipData = Number(page) * takeData - takeData; + + try { + let fixData; + const fixStatus = _.startCase(status); + + if (!page && !search) { + fixData = await prisma.event.findMany({ + orderBy: { + updatedAt: "desc", + }, + where: { + active: true, + isArsip: false, + EventMaster_Status: { + name: fixStatus, + }, + }, + include: { + Author: { + select: { + id: true, + username: true, + Profile: { + select: { + name: true, + }, + }, + }, + }, + EventMaster_Status: true, + EventMaster_TipeAcara: true, + }, + }); + } else if (!page && search) { + fixData = await prisma.event.findMany({ + orderBy: { + updatedAt: "desc", + }, + where: { + active: true, + isArsip: false, + EventMaster_Status: { + name: fixStatus, + }, + title: { + contains: search, + mode: "insensitive", + }, + }, + include: { + Author: { + select: { + id: true, + username: true, + Profile: { + select: { + name: true, + }, + }, + }, + }, + EventMaster_Status: true, + EventMaster_TipeAcara: true, + }, + }); + } else if (page && !search) { + if (fixStatus === "Publish") { + const getAllData = await prisma.event.findMany({ + where: { + active: true, + EventMaster_Status: { + name: fixStatus, + }, + isArsip: false, + }, + }); + + for (let i of getAllData) { + if (moment(i.tanggalSelesai).diff(moment(), "minutes") < 0) { + await prisma.event.update({ + where: { + id: i.id, + }, + data: { + isArsip: true, + }, + }); + } + } + } + + const data = await prisma.event.findMany({ + take: takeData, + skip: skipData, + orderBy: { + updatedAt: "desc", + }, + where: { + active: true, + isArsip: false, + EventMaster_Status: { + name: fixStatus, + }, + }, + include: { + Author: { + select: { + id: true, + username: true, + Profile: { + select: { + name: true, + }, + }, + }, + }, + EventMaster_Status: true, + EventMaster_TipeAcara: true, + }, + }); + + const nCount = await prisma.event.count({ + where: { + EventMaster_Status: { + name: fixStatus, + }, + active: true, + isArsip: false, + }, + }); + + fixData = { + data: data, + nPage: _.ceil(nCount / takeData), + }; + } else if (page && search) { + if (fixStatus === "Publish") { + const getAllData = await prisma.event.findMany({ + where: { + active: true, + EventMaster_Status: { + name: fixStatus, + }, + isArsip: false, + }, + }); + + for (let i of getAllData) { + if (moment(i.tanggalSelesai).diff(moment(), "minutes") < 0) { + await prisma.event.update({ + where: { + id: i.id, + }, + data: { + isArsip: true, + }, + }); + } + } + } + + const data = await prisma.event.findMany({ + take: takeData, + skip: skipData, + orderBy: { + updatedAt: "desc", + }, + where: { + active: true, + isArsip: false, + EventMaster_Status: { + name: fixStatus, + }, + title: { + contains: search, + mode: "insensitive", + }, + }, + include: { + Author: { + select: { + id: true, + username: true, + Profile: { + select: { + name: true, + }, + }, + }, + }, + EventMaster_Status: true, + EventMaster_TipeAcara: true, + }, + }); + + const nCount = await prisma.event.count({ + where: { + active: true, + isArsip: false, + title: { + contains: search, + mode: "insensitive", + }, + }, + }); + + fixData = { + data: data, + nPage: _.ceil(nCount / takeData), + }; + } + + return NextResponse.json({ + success: true, + message: `Success get data table event ${status}`, + data: fixData, + }); + } catch (error) { + backendLogger.error("Error get data table event dashboard >>", error); + return NextResponse.json( + { + success: false, + message: "Failed get data table event dashboard", + reason: (error as Error).message, + }, + { status: 500 } + ); + } finally { + await prisma.$disconnect(); + } +} diff --git a/src/app/api/admin/event/dashboard/[name]/route.ts b/src/app/api/admin/event/dashboard/[name]/route.ts new file mode 100644 index 00000000..9ebc3310 --- /dev/null +++ b/src/app/api/admin/event/dashboard/[name]/route.ts @@ -0,0 +1,53 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import _ from "lodash"; +import { NextResponse } from "next/server"; + +export async function GET( + request: Request, + { params }: { params: { name: string } } +) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json( + { success: false, message: "Method not allowed" }, + { status: 405 } + ); + } + + const { name } = params; + + try { + let fixData; + const fixStatus = _.startCase(name); + fixData = await prisma.event.count({ + where: { + EventMaster_Status: { + name: fixStatus, + }, + isArsip: false, + }, + }); + + return NextResponse.json( + { + success: true, + message: "Success get data event dashboard", + data: fixData, + }, + { status: 200 } + ); + } catch (error) { + backendLogger.error("Error get data event dashboard >>", error); + return NextResponse.json( + { + success: false, + message: "Failed to get data", + reason: (error as Error).message, + }, + { status: 500 } + ); + } finally { + await prisma.$disconnect(); + } +} diff --git a/src/app/api/admin/event/dashboard/riwayat/route.ts b/src/app/api/admin/event/dashboard/riwayat/route.ts new file mode 100644 index 00000000..377d371d --- /dev/null +++ b/src/app/api/admin/event/dashboard/riwayat/route.ts @@ -0,0 +1,47 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import _ from "lodash"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json( + { success: false, message: "Method not allowed" }, + { status: 405 } + ); + } + + try { + let fixData; + fixData = await prisma.event.count({ + where: { + EventMaster_Status: { + name: "Publish", + }, + isArsip: true, + }, + }); + + return NextResponse.json( + { + success: true, + message: "Success get data riwayat event dashboard", + data: fixData, + }, + { status: 200 } + ); + } catch (error) { + backendLogger.error("Error get data riwayat event dashboard >>", error); + return NextResponse.json( + { + success: false, + message: "Failed to get data", + reason: (error as Error).message, + }, + { status: 500 } + ); + } finally { + await prisma.$disconnect(); + } +} diff --git a/src/app/api/admin/event/dashboard/tipe-acara/route.ts b/src/app/api/admin/event/dashboard/tipe-acara/route.ts new file mode 100644 index 00000000..e4d22fdf --- /dev/null +++ b/src/app/api/admin/event/dashboard/tipe-acara/route.ts @@ -0,0 +1,44 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import _ from "lodash"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json( + { success: false, message: "Method not allowed" }, + { status: 405 } + ); + } + + try { + let fixData; + fixData = await prisma.eventMaster_TipeAcara.count({ + where: { + active: true, + }, + }); + + return NextResponse.json( + { + success: true, + message: "Success get data riwayat event dashboard", + data: fixData, + }, + { status: 200 } + ); + } catch (error) { + backendLogger.error("Error get data riwayat event dashboard >>", error); + return NextResponse.json( + { + success: false, + message: "Failed to get data", + reason: (error as Error).message, + }, + { status: 500 } + ); + } finally { + await prisma.$disconnect(); + } +} diff --git a/src/app/api/admin/event/riwayat/route.ts b/src/app/api/admin/event/riwayat/route.ts new file mode 100644 index 00000000..a863c095 --- /dev/null +++ b/src/app/api/admin/event/riwayat/route.ts @@ -0,0 +1,201 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import _ from "lodash"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json( + { success: false, message: "Method not allowed" }, + { status: 405 } + ); + } + + const { searchParams } = new URL(request.url); + const search = searchParams.get("search"); + const page = searchParams.get("page"); + const takeData = 10; + const skipData = Number(page) * takeData - takeData; + + try { + let fixData; + + if (!page && !search) { + fixData = await prisma.event.findMany({ + orderBy: { + createdAt: "desc", + }, + where: { + EventMaster_Status: { + name: "Publish", + }, + isArsip: true, + }, + include: { + Author: { + select: { + id: true, + username: true, + Profile: { + select: { + name: true, + }, + }, + }, + }, + EventMaster_Status: true, + EventMaster_TipeAcara: true, + }, + }); + } else if (!page && search) { + fixData = await prisma.event.findMany({ + orderBy: { + createdAt: "desc", + }, + where: { + EventMaster_Status: { + name: "Publish", + }, + isArsip: true, + title: { + contains: search, + mode: "insensitive", + }, + }, + include: { + Author: { + select: { + id: true, + username: true, + Profile: { + select: { + name: true, + }, + }, + }, + }, + EventMaster_Status: true, + EventMaster_TipeAcara: true, + }, + }); + } else if (page && !search) { + const data = await prisma.event.findMany({ + take: takeData, + skip: skipData, + orderBy: { + createdAt: "desc", + }, + where: { + EventMaster_Status: { + name: "Publish", + }, + isArsip: true, + }, + include: { + Author: { + select: { + id: true, + username: true, + Profile: { + select: { + name: true, + }, + }, + }, + }, + EventMaster_Status: true, + EventMaster_TipeAcara: true, + }, + }); + + const nCount = await prisma.event.count({ + where: { + active: true, + isArsip: true, + EventMaster_Status: { + name: "Publish", + }, + }, + }); + + fixData = { + data: data, + nPage: _.ceil(nCount / takeData), + }; + } else if (page && search) { + const data = await prisma.event.findMany({ + take: takeData, + skip: skipData, + orderBy: { + createdAt: "desc", + }, + where: { + EventMaster_Status: { + name: "Publish", + }, + isArsip: true, + title: { + contains: search, + mode: "insensitive", + }, + }, + include: { + Author: { + select: { + id: true, + username: true, + Profile: { + select: { + name: true, + }, + }, + }, + }, + EventMaster_Status: true, + EventMaster_TipeAcara: true, + }, + }); + + const nCount = await prisma.event.count({ + where: { + active: true, + isArsip: true, + EventMaster_Status: { + name: "Publish", + }, + title: { + contains: search, + mode: "insensitive", + }, + }, + }); + + fixData = { + data, + nPage: _.ceil(nCount / takeData), + }; + } + + return NextResponse.json( + { + success: true, + message: "Success get data riwayat event", + data: fixData, + }, + { status: 200 } + ); + } catch (error) { + backendLogger.error("Error get data riwayat event >>", error); + return NextResponse.json( + { + success: false, + message: "Error get data riwayat event", + reason: (error as Error).message, + }, + { status: 500 } + ); + } finally { + await prisma.$disconnect(); + } +} diff --git a/src/app/api/admin/forum/dashboard/publish/route.ts b/src/app/api/admin/forum/dashboard/publish/route.ts new file mode 100644 index 00000000..f69c6f0d --- /dev/null +++ b/src/app/api/admin/forum/dashboard/publish/route.ts @@ -0,0 +1,44 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request, { params }: { + params: { status: string } +}) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json({ + success: false, + message: "Method not allowed", + }, + { status: 405 } + ) + } + try { + let fixData; + fixData = await prisma.forum_Posting.count({ + where: { + isActive: true, + } + }) + + return NextResponse.json({ + success: true, + message: "Success get data forum dashboard", + data: fixData, + }, + { status: 200 } + ); + } catch (error) { + backendLogger.error("Error get data forum dashboard", error); + return NextResponse.json({ + success: false, + message: "Error get data forum dashboard", + reason: (error as Error).message + }, + { status: 500 } + ) + } finally { + await prisma.$disconnect(); + } +} \ No newline at end of file diff --git a/src/app/api/admin/forum/dashboard/report_komentar/route.ts b/src/app/api/admin/forum/dashboard/report_komentar/route.ts new file mode 100644 index 00000000..f397cb7c --- /dev/null +++ b/src/app/api/admin/forum/dashboard/report_komentar/route.ts @@ -0,0 +1,41 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json({ + success: false, + message: "Method not allowed", + }, + { status: 405 } + ) + } + try { + let fixData; + fixData = await prisma.forum_ReportKomentar.count({ + where: { + isActive: true, + } + }) + return NextResponse.json({ + success: true, + message: "Success get data forum dashboard", + data: fixData, + }, + { status: 200 } + ); + } catch (error) { + backendLogger.error("Error get data forum dashboard", error); + return NextResponse.json({ + success: false, + message: "Error get data forum dashboard", + reason: (error as Error).message + }, + { status: 500 } + ) + } finally { + await prisma.$disconnect(); + } +} \ No newline at end of file diff --git a/src/app/api/admin/forum/dashboard/report_posting/route.ts b/src/app/api/admin/forum/dashboard/report_posting/route.ts new file mode 100644 index 00000000..c0b5e3fb --- /dev/null +++ b/src/app/api/admin/forum/dashboard/report_posting/route.ts @@ -0,0 +1,41 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json({ + success: false, + message: "Method not allowed", + }, + { status: 405 } + ) + } + try { + let fixData; + fixData = await prisma.forum_ReportPosting.count({ + where: { + isActive: true, + } + }) + return NextResponse.json({ + success: true, + message: "Success get data forum dashboard", + data: fixData, + }, + { status: 200 } + ); + } catch (error) { + backendLogger.error("Error get data forum dashboard", error); + return NextResponse.json({ + success: false, + message: "Error get data forum dashboard", + reason: (error as Error).message + }, + { status: 500 } + ) + } finally { + await prisma.$disconnect(); + } +} \ No newline at end of file diff --git a/src/app/api/admin/investasi/dashboard/[name]/route.ts b/src/app/api/admin/investasi/dashboard/[name]/route.ts new file mode 100644 index 00000000..c577c34b --- /dev/null +++ b/src/app/api/admin/investasi/dashboard/[name]/route.ts @@ -0,0 +1,46 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import _ from "lodash"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request, { params }: { params: { name: string } }) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json({ + success: false, + message: "Method not allowed", + }, + { status: 405 } + ); + } + const { name } = params; + try { + let fixData; + const fixStatus = _.startCase(name); + fixData = await prisma.investasi.count({ + where: { + MasterStatusInvestasi: { + name: fixStatus + }, + } + }) + return NextResponse.json({ + success: true, + message: "Success get data investasi dashboard", + data: fixData, + }, + { status: 200 } + ) + } catch (error) { + backendLogger.error("Error get data investasi dashboard >>", error); + return NextResponse.json({ + success: false, + message: "Error get data investasi dashboard", + reason: (error as Error).message + }, + { status: 500 } + ) + } finally { + await prisma.$disconnect(); + } +} diff --git a/src/app/api/admin/job/dashboard/[status]/route.ts b/src/app/api/admin/job/dashboard/[status]/route.ts new file mode 100644 index 00000000..dd45ec7e --- /dev/null +++ b/src/app/api/admin/job/dashboard/[status]/route.ts @@ -0,0 +1,50 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import _ from "lodash"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request, { params }: { + params: { status: string } +}) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json({ + success: false, + message: "Method not allowed", + }, + { status: 405 } + ) + } + const { status } = params; + try { + let fixData; + const fixStatus = _.startCase(status); + fixData = await prisma.job.count({ + where: { + MasterStatus: { + name: fixStatus, + }, + isArsip: false, + } + }); + + return NextResponse.json({ + success: true, + message: "Success get data job-vacancy dashboard", + data: fixData + }, + { status: 200 } + ); + } catch (error) { + backendLogger.error("Error get data job-vacancy dashboard", error); + return NextResponse.json({ + success: false, + message: "Error get data job-vacancy dashboard", + reason: (error as Error).message, + }, + { status: 500 } + ) + } finally { + await prisma.$disconnect(); + } +} \ No newline at end of file diff --git a/src/app/api/admin/job/dashboard/arsip/route.ts b/src/app/api/admin/job/dashboard/arsip/route.ts new file mode 100644 index 00000000..fd1d45c5 --- /dev/null +++ b/src/app/api/admin/job/dashboard/arsip/route.ts @@ -0,0 +1,44 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json({ + success: false, + message: "Method not allowed", + }, + { status: 405 } + ); + } + try { + let fixData; + fixData = await prisma.job.count({ + where: { + MasterStatus: { + name: "Publish" + }, + isArsip: true + } + }) + return NextResponse.json({ + success: true, + message: "Success get data job-vacancy dashboard", + data: fixData + }, + { status: 200 } + ) + } catch (error) { + backendLogger.error("Error get data job-vacancy dashboard", error); + return NextResponse.json({ + success: false, + message: "Error get data job-vacancy dashboard", + reason: (error as Error).message + }, + { status: 500 } + ) + } finally { + await prisma.$disconnect(); + } +} \ No newline at end of file diff --git a/src/app/api/admin/main_dashboard/portofolio/route.ts b/src/app/api/admin/main_dashboard/portofolio/route.ts new file mode 100644 index 00000000..fa56632d --- /dev/null +++ b/src/app/api/admin/main_dashboard/portofolio/route.ts @@ -0,0 +1,31 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request) { + try { + const data = await prisma.portofolio.count({ + where: { + active: true + } + }); + return NextResponse.json({ + success: true, + message: "Data portofolio", + data: data + }, + { status: 200 } + ); + } catch (error) { + backendLogger.error("Error Get Count Portofolio Main Dashboard") + return NextResponse.json({ + success: false, + message: "Error Get Count Portofolio Main Dashboard", + data: null + }, + { status: 500 } + ); + } finally { + await prisma.$disconnect(); + } +} \ No newline at end of file diff --git a/src/app/api/admin/main_dashboard/user/route.ts b/src/app/api/admin/main_dashboard/user/route.ts new file mode 100644 index 00000000..2470f74b --- /dev/null +++ b/src/app/api/admin/main_dashboard/user/route.ts @@ -0,0 +1,42 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json( + { success: false, message: "Method not allowed" }, + { status: 405 } + ); + } + try { + const data = await prisma.user.count({ + where: { + active: true + }, + + + }) + return NextResponse.json({ + success: true, + message: "Data user", + data: data + }, + { status: 200 } + ) + } catch (error) { + backendLogger.error("Error Get Count User Main Dashboard") + return NextResponse.json({ + success: false, + message: "Gagal mendapatkan data", + reason: (error as Error).message + }, + { status: 500 } + ) + + } finally { + await prisma.$disconnect(); + } + +} \ No newline at end of file diff --git a/src/app/api/admin/voting/dashboard/[name]/route.ts b/src/app/api/admin/voting/dashboard/[name]/route.ts new file mode 100644 index 00000000..3f498707 --- /dev/null +++ b/src/app/api/admin/voting/dashboard/[name]/route.ts @@ -0,0 +1,51 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import _ from "lodash"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request, { params }: { + params: { name: string } +}) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json({ + success: false, + message: "Method not allowed", + }, + { status: 405 } + ) + } + + const { name } = params; + try { + let fixData; + const fixStatus = _.startCase(name); + fixData = await prisma.voting.count({ + where: { + Voting_Status: { + name: fixStatus + }, + isArsip: false + }, + }) + + return NextResponse.json({ + success: true, + message: "Success get data voting dashboard", + data: fixData + }, + { status: 200 } + ) + } catch (error) { + backendLogger.error("Error get data voting dashboard >>", error); + return NextResponse.json({ + success: false, + message: "Error get data voting dashboard", + reason: (error as Error).message + }, + { status: 500 } + ) + } finally { + await prisma.$disconnect(); + } +} \ No newline at end of file diff --git a/src/app/api/admin/voting/dashboard/riwayat/route.ts b/src/app/api/admin/voting/dashboard/riwayat/route.ts new file mode 100644 index 00000000..3857af0e --- /dev/null +++ b/src/app/api/admin/voting/dashboard/riwayat/route.ts @@ -0,0 +1,44 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json({ + success: false, + message: "Method not allowed", + }, + { status: 405 } + ) + } + try { + let fixData; + fixData = await prisma.voting.count({ + where: { + Voting_Status: { + name: "Publish", + }, + isArsip: true, + } + }) + return NextResponse.json({ + success: true, + message: 'Success get data voting dashboard', + data: fixData + }, + { status: 200 } + ) + } catch (error) { + backendLogger.error('Error get data voting dashboard >>', error); + NextResponse.json({ + success: false, + message: 'Error get data voting dashboard', + reason: (error as Error).message + }, + { status: 500 } + ) + } finally { + await prisma.$disconnect(); + } +} \ No newline at end of file diff --git a/src/app/api/event/[id]/route.ts b/src/app/api/event/[id]/route.ts new file mode 100644 index 00000000..0d7214c7 --- /dev/null +++ b/src/app/api/event/[id]/route.ts @@ -0,0 +1,48 @@ +import { prisma } from "@/app/lib"; +import { NextResponse } from "next/server"; + +export async function GET( + request: Request, + context: { params: { id: string } } +) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json( + { success: false, message: "Method not allowed" }, + { status: 405 } + ); + } + + try { + let fixData; + const { id } = context.params; + + fixData = await prisma.event.findUnique({ + where: { + id: id, + }, + include: { + Author: { + include: { + Profile: true, + }, + }, + EventMaster_TipeAcara: true, + EventMaster_Status: true, + }, + }); + + return NextResponse.json({ + success: true, + message: "Berhasil mendapatkan data", + data: fixData, + }); + } catch (error) { + return NextResponse.json( + { success: false, message: "Gagal mendapatkan data" }, + { status: 500 } + ); + } finally { + await prisma.$disconnect(); + } +} diff --git a/src/app/api/event/check-kehadiran/route.ts b/src/app/api/event/check-kehadiran/route.ts index 083f6e05..b0ecbf78 100644 --- a/src/app/api/event/check-kehadiran/route.ts +++ b/src/app/api/event/check-kehadiran/route.ts @@ -1,8 +1,16 @@ import { event_funCheckKehadiran } from "@/app_modules/event/fun"; import { NextResponse } from "next/server"; -export async function GET(req: Request) { - const { searchParams } = new URL(req.url); +export async function GET(request: Request) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json( + { success: false, message: "Method not allowed" }, + { status: 405 } + ); + } + + const { searchParams } = new URL(request.url); const userId = searchParams.get("userId"); const eventId = searchParams.get("eventId"); diff --git a/src/app/api/event/check-peserta/route.ts b/src/app/api/event/check-peserta/route.ts index 49b863e2..57abe1a4 100644 --- a/src/app/api/event/check-peserta/route.ts +++ b/src/app/api/event/check-peserta/route.ts @@ -1,15 +1,50 @@ -import { event_funCheckPesertaByUserId } from "@/app_modules/event/fun"; +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; import { NextResponse } from "next/server"; -export async function GET(req: Request) { - const { searchParams } = new URL(req.url); - const userId = searchParams.get("userId"); - const eventId = searchParams.get("eventId"); +export async function GET(request: Request) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json( + { success: false, message: "Method not allowed" }, + { status: 405 } + ); + } - const res = await event_funCheckPesertaByUserId({ - eventId: eventId as string, - userId: userId as string, - }); + try { + let fixData; + const { searchParams } = new URL(request.url); + const userId = searchParams.get("userId"); + const eventId = searchParams.get("eventId"); - return NextResponse.json(res, { status: 200 }); + const check = await prisma.event_Peserta.findFirst({ + where: { + userId: userId, + eventId: eventId, + }, + }); + + if (check) { + fixData = true; + } else { + fixData = false; + } + + await prisma.$disconnect(); + return NextResponse.json( + { success: true, message: "Success get data", data: fixData }, + { status: 200 } + ); + } catch (error) { + await prisma.$disconnect(); + backendLogger.error("Error get data detail event:", error); + return NextResponse.json( + { + success: false, + message: "Gagal mendapatkan data", + reason: (error as Error).message, + }, + { status: 500 } + ); + } } diff --git a/src/app/api/event/peserta/[id]/route.ts b/src/app/api/event/peserta/[id]/route.ts new file mode 100644 index 00000000..dcc565d8 --- /dev/null +++ b/src/app/api/event/peserta/[id]/route.ts @@ -0,0 +1,67 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import { NextResponse } from "next/server"; + +export async function GET( + request: Request, + context: { params: { id: string } } +) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json( + { success: false, message: "Method not allowed" }, + { status: 405 } + ); + } + + try { + let fixData; + const { id } = context.params; + const { searchParams } = new URL(request.url); + const page = searchParams.get("page"); + const takeData = 10; + const skipData = Number(page) * takeData - takeData; + + fixData = await prisma.event_Peserta.findMany({ + take: takeData, + skip: skipData, + orderBy: { + updatedAt: "desc", + }, + where: { + eventId: id, + }, + select: { + id: true, + active: true, + createdAt: true, + updatedAt: true, + userId: true, + isPresent: true, + User: { + select: { + Profile: true, + }, + }, + Event: true, + eventId: true, + }, + }); + + return NextResponse.json({ + success: true, + message: "Success get data", + data: fixData, + }); + } catch (error) { + backendLogger.error("Error get list data:", error); + return NextResponse.json( + { + success: false, + message: "Failed get data", + reason: (error as Error).message, + }, + { status: 500 } + ); + } +} diff --git a/src/app/api/event/sponsor/[id]/route.ts b/src/app/api/event/sponsor/[id]/route.ts new file mode 100644 index 00000000..c52fce6f --- /dev/null +++ b/src/app/api/event/sponsor/[id]/route.ts @@ -0,0 +1,106 @@ +import { prisma } from "@/app/lib"; +import { funGetUserIdByToken } from "@/app_modules/_global/fun/get"; +import { IEventSponsor } from "@/app_modules/event/_lib/interface"; +import backendLogger from "@/util/backendLogger"; +import { NextResponse } from "next/server"; + +export async function POST( + request: Request, + context: { params: { id: string } } +) { + const method = request.method; + if (method !== "POST") { + return NextResponse.json( + { success: false, message: "Method not allowed" }, + { status: 405 } + ); + } + + const userLoginId = await funGetUserIdByToken(); + + if (!userLoginId) { + return NextResponse.json( + { success: false, message: "User not found" }, + { status: 401 } + ); + } + + try { + let fixData; + const { id } = context.params; + const req: IEventSponsor = await request.json(); + + fixData = await prisma.eventSponsor.create({ + data: { + eventId: id, + name: req.name as string, + fileName: req.fileName as string, + fileExt: req.fileExt as string, + fileId: req.fileId as string, + // authorId: userLoginId, + }, + }); + + await prisma.$disconnect(); + return NextResponse.json({ + success: true, + message: "Success create sponsor", + }); + } catch (error) { + await prisma.$disconnect(); + backendLogger.error("Error create sponsor event", error); + return NextResponse.json( + { success: false, message: "Failed create sponsor" }, + { status: 500 } + ); + } +} + +export async function GET( + request: Request, + context: { params: { id: string } } +) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json( + { success: false, message: "Method not allowed" }, + { status: 405 } + ); + } + + try { + let fixData; + const { id } = context.params; + + fixData = await prisma.eventSponsor.findUnique({ + where: { + id: id, + }, + include: { + Author: { + include: { + Profile: true, + }, + }, + }, + }); + + return NextResponse.json({ + success: true, + message: "Success create sponsor", + data: fixData, + }); + } catch (error) { + backendLogger.error("Error get sponsor event", error); + return NextResponse.json( + { + success: false, + message: "Failed create sponsor", + reason: (error as Error).message, + }, + { status: 500 } + ); + } finally { + await prisma.$disconnect(); + } +} diff --git a/src/app/api/event/sponsor/list/[id]/route.ts b/src/app/api/event/sponsor/list/[id]/route.ts new file mode 100644 index 00000000..cedfdf28 --- /dev/null +++ b/src/app/api/event/sponsor/list/[id]/route.ts @@ -0,0 +1,79 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import { NextResponse } from "next/server"; + +export async function GET( + request: Request, + context: { params: { id: string } } +) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json( + { success: false, message: "Method not allowed" }, + { status: 405 } + ); + } + + try { + let fixData; + const { id } = context.params; + const { searchParams } = new URL(request.url); + const page = searchParams.get("page"); + const takeData = 10; + const skipData = Number(page) * takeData - takeData; + + if (!page) { + fixData = await prisma.eventSponsor.findMany({ + orderBy: { + createdAt: "desc", + }, + where: { + eventId: id, + }, + include: { + Author: { + include: { + Profile: true, + }, + }, + }, + }); + } else { + fixData = await prisma.eventSponsor.findMany({ + take: takeData, + skip: skipData, + orderBy: { + createdAt: "desc", + }, + where: { + eventId: id, + }, + include: { + Author: { + include: { + Profile: true, + }, + }, + }, + }); + } + + await prisma.$disconnect(); + return NextResponse.json({ + success: true, + message: "Success create sponsor", + data: fixData, + }); + } catch (error) { + backendLogger.error("Error get sponsor event", error); + await prisma.$disconnect(); + return NextResponse.json( + { + success: false, + message: "Failed create sponsor", + reason: (error as Error).message, + }, + { status: 500 } + ); + } +} diff --git a/src/app/api/event/tipe-acara/route.ts b/src/app/api/event/tipe-acara/route.ts new file mode 100644 index 00000000..afc7e021 --- /dev/null +++ b/src/app/api/event/tipe-acara/route.ts @@ -0,0 +1,39 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json( + { success: false, message: "Method not allowed" }, + { status: 405 } + ); + } + + try { + const data = await prisma.eventMaster_TipeAcara.findMany({ + orderBy: { + id: "asc", + }, + }); + + return NextResponse.json({ + success: true, + message: "Success get tipe acara", + data: data, + }); + } catch (error) { + backendLogger.error("Error get tipe acara", error); + return NextResponse.json( + { + success: false, + message: "Failed get tipe acara ", + reason: (error as Error).message, + }, + { status: 500 } + ); + } finally { + await prisma.$disconnect(); + } +} diff --git a/src/app/api/master/bank/route.ts b/src/app/api/master/bank/route.ts new file mode 100644 index 00000000..2ce3228b --- /dev/null +++ b/src/app/api/master/bank/route.ts @@ -0,0 +1,41 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json( + { success: false, message: "Method not allowed" }, + { status: 405 } + ); + } + + try { + const res = await prisma.masterBank.findMany({ + orderBy: { + updatedAt: "asc", + }, + where: { + isActive: true, + }, + }); + + await prisma.$disconnect(); + return NextResponse.json( + { success: true, message: "Berhasil mendapatkan data", data: res }, + { status: 200 } + ); + } catch (error) { + await prisma.$disconnect(); + backendLogger.error("Error Get Master Bank >>", error); + return NextResponse.json( + { + success: false, + message: "API Error Get Data", + reason: (error as Error).message, + }, + { status: 500 } + ); + } +} diff --git a/src/app/api/master/status_transaksi/route.ts b/src/app/api/master/status_transaksi/route.ts new file mode 100644 index 00000000..e7abd5e0 --- /dev/null +++ b/src/app/api/master/status_transaksi/route.ts @@ -0,0 +1,41 @@ +import { prisma } from "@/app/lib"; +import backendLogger from "@/util/backendLogger"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request) { + const method = request.method; + if (method !== "GET") { + return NextResponse.json( + { success: false, message: "Method not allowed" }, + { status: 405 } + ); + } + + try { + const res = await prisma.masterStatusTransaksi.findMany({ + orderBy: { + updatedAt: "asc", + }, + where: { + isActive: true, + }, + }); + + await prisma.$disconnect(); + return NextResponse.json( + { success: true, message: "Berhasil mendapatkan data", data: res }, + { status: 200 } + ); + } catch (error) { + await prisma.$disconnect(); + backendLogger.error("Error Get Master Status Transaksi >>", error); + return NextResponse.json( + { + success: false, + message: "API Error Get Data", + reason: (error as Error).message, + }, + { status: 500 } + ); + } +} diff --git a/src/app/api/new/investasi/berita/[id]/route.ts b/src/app/api/new/investasi/berita/[id]/route.ts index 32fc8fbc..72e1b787 100644 --- a/src/app/api/new/investasi/berita/[id]/route.ts +++ b/src/app/api/new/investasi/berita/[id]/route.ts @@ -68,18 +68,3 @@ export async function GET( ); } } - -async function main({ id }: { id: string }) { - const fixData = await prisma.beritaInvestasi.findMany({ - take: 10, - skip: 0, - orderBy: { - updatedAt: "desc", - }, - where: { - investasiId: id.trim(), - active: true, - }, - }); - console.log("data sebelum disconnect>>", fixData); -} diff --git a/src/app/api/user-validate/route.ts b/src/app/api/user-validate/route.ts index 8842f6f1..0b5c8cf3 100644 --- a/src/app/api/user-validate/route.ts +++ b/src/app/api/user-validate/route.ts @@ -1,33 +1,55 @@ import { decrypt } from "@/app/auth/_lib/decrypt"; import { prisma } from "@/app/lib"; -import { cookies } from 'next/headers' +import { cookies } from "next/headers"; import { NextRequest, NextResponse } from "next/server"; export const dynamic = "force-dynamic"; export async function GET(req: NextRequest) { - const token = req.headers.get('Authorization')?.split(' ')[1]; + try { + const token = req.headers.get("Authorization")?.split(" ")[1]; const decripted = await decrypt({ - token: token!, - encodedKey: process.env.NEXT_PUBLIC_BASE_TOKEN_KEY! - }) + token: token!, + encodedKey: process.env.NEXT_PUBLIC_BASE_TOKEN_KEY!, + }); if (!decripted) { - return NextResponse.json({ - success: false, - message: "Unauthorized" - }, { status: 401 }) + await prisma.$disconnect(); + return NextResponse.json( + { + success: false, + message: "Unauthorized", + }, + { status: 401 } + ); } const user = await prisma.user.findUnique({ - where: { - id: decripted.id - } - }) + where: { + id: decripted.id, + }, + }); + + // Disconnect after successful query + await prisma.$disconnect(); + return NextResponse.json({ - success: true, - message: "Berhasil mendapatkan data", - data: user - }) -} \ No newline at end of file + success: true, + message: "Berhasil mendapatkan data", + data: user, + }); + } catch (error) { + // Ensure connection is closed even if error occurs + await prisma.$disconnect(); + + console.error("Error in user validation:", error); + return NextResponse.json( + { + success: false, + message: "Terjadi kesalahan pada server", + }, + { status: 500 } + ); + } +} diff --git a/src/app/api/user/all/route.ts b/src/app/api/user/all/route.ts new file mode 100644 index 00000000..0be0d443 --- /dev/null +++ b/src/app/api/user/all/route.ts @@ -0,0 +1,46 @@ +import { prisma } from "@/app/lib"; +import { NextResponse } from "next/server"; + +export async function GET(request: Request) { + if (request.method === "GET") { + try { + let fixData; + const { searchParams } = new URL(request.url); + const except_id = searchParams.get("except-id"); + + if (!except_id) { + fixData = await prisma.user.findMany({ + where: { + active: true, + }, + }); + } else { + fixData = await prisma.user.findMany({ + where: { + active: true, + masterUserRoleId: "1", + id: { + not: except_id, + }, + }, + }); + } + + return NextResponse.json({ + success: true, + message: "Berhasil mendapatkan data", + data: fixData, + }); + } catch (error) { + return NextResponse.json({ + success: false, + message: "Gagal mendapatkan data", + }); + } + } else { + return NextResponse.json({ + success: false, + message: "Method not allowed", + }); + } +} diff --git a/src/app/dev/admin/donasi/main/page.tsx b/src/app/dev/admin/donasi/main/page.tsx index 63f2c0ce..133a7c09 100644 --- a/src/app/dev/admin/donasi/main/page.tsx +++ b/src/app/dev/admin/donasi/main/page.tsx @@ -10,10 +10,9 @@ export default async function Page() { return ( <> ); diff --git a/src/app/dev/admin/event/_lib/api_fecth_admin_event.ts b/src/app/dev/admin/event/_lib/api_fecth_admin_event.ts new file mode 100644 index 00000000..19a0c809 --- /dev/null +++ b/src/app/dev/admin/event/_lib/api_fecth_admin_event.ts @@ -0,0 +1,134 @@ +export { + apiGetAdminEventStatusCountDashboard as apiGetEventStatusCountDashboard, + apiGetAdminEventCountTipeAcara as apiGetEventTipeAcara, + apiGetAdminEventRiwayatCount as apiGetEventRiwayatCount, + apiGetAdminEventByStatus as apiGetDataEventByStatus, + apiGetAdminEventRiwayat, + apiGetAdminEventTipeAcara, +}; + +const apiGetAdminEventStatusCountDashboard = async ({ + name, +}: { + name: "Publish" | "Review" | "Reject"; +}) => { + const { token } = await fetch("/api/get-cookie").then((res) => res.json()); + if (!token) return await token.json().catch(() => null); + + const response = await fetch(`/api/admin/event/dashboard/${name}`, { + method: "GET", + headers: { + "Content-Type": "application/json", + Accept: "application/json", + "Access-Control-Allow-Origin": "*", + Authorization: `Bearer ${token}`, + }, + }); + + return await response.json().catch(() => null); +}; + +const apiGetAdminEventRiwayatCount = async () => { + const { token } = await fetch("/api/get-cookie").then((res) => res.json()); + if (!token) return await token.json().catch(() => null); + + const response = await fetch(`/api/admin/event/dashboard/riwayat`, { + method: "GET", + headers: { + "Content-Type": "application/json", + Accept: "application/json", + "Access-Control-Allow-Origin": "*", + Authorization: `Bearer ${token}`, + }, + }); + + return await response.json().catch(() => null); +}; + +const apiGetAdminEventCountTipeAcara = async () => { + const { token } = await fetch("/api/get-cookie").then((res) => res.json()); + if (!token) return await token.json().catch(() => null); + + const response = await fetch(`/api/admin/event/dashboard/tipe-acara`, { + method: "GET", + headers: { + "Content-Type": "application/json", + Accept: "application/json", + "Access-Control-Allow-Origin": "*", + Authorization: `Bearer ${token}`, + }, + }); + + return await response.json().catch(() => null); +}; + +const apiGetAdminEventByStatus = async ({ + status, + page, + search, +}: { + status: "Publish" | "Review" | "Reject"; + page: string; + search: string; +}) => { + const { token } = await fetch("/api/get-cookie").then((res) => res.json()); + if (!token) return await token.json().catch(() => null); + + const isPage = page ? `?page=${page}` : ""; + const isSearch = search ? `&search=${search}` : ""; + const respone = await fetch( + `/api/admin/event/${status}${isPage}${isSearch}`, + { + headers: { + "Content-Type": "application/json", + Accept: "application/json", + "Access-Control-Allow-Origin": "*", + Authorization: `Bearer ${token}`, + }, + } + ); + + return await respone.json().catch(() => null); +}; + +const apiGetAdminEventRiwayat = async ({ + page, + search, +}: { + page: string; + search: string; +}) => { + const { token } = await fetch("/api/get-cookie").then((res) => res.json()); + if (!token) return await token.json().catch(() => null); + + const isPage = page ? `?page=${page}` : ""; + const isSearch = search ? `&search=${search}` : ""; + const response = await fetch(`/api/admin/event/riwayat${isPage}${isSearch}`, { + method: "GET", + headers: { + "Content-Type": "application/json", + Accept: "application/json", + "Access-Control-Allow-Origin": "*", + Authorization: `Bearer ${token}`, + }, + }); + + return await response.json().catch(() => null); +}; + +const apiGetAdminEventTipeAcara = async () => { + const { token } = await fetch("/api/get-cookie").then((res) => res.json()); + if (!token) return await token.json().catch(() => null); + + const response = await fetch(`/api/event/tipe-acara`, { + method: "GET", + headers: { + "Content-Type": "application/json", + Accept: "application/json", + "Access-Control-Allow-Origin": "*", + Authorization: `Bearer ${token}`, + }, + }); + + return await response.json().catch(() => null); +}; diff --git a/src/app/dev/admin/event/child/riwayat/page.tsx b/src/app/dev/admin/event/child/riwayat/page.tsx index a6923bad..084fede7 100644 --- a/src/app/dev/admin/event/child/riwayat/page.tsx +++ b/src/app/dev/admin/event/child/riwayat/page.tsx @@ -1,12 +1,10 @@ import { AdminEvent_Riwayat } from "@/app_modules/admin/event"; -import { adminEvent_funGetListAllRiwayat } from "@/app_modules/admin/event/fun/get/get_list_all_riwayat"; export default async function Page() { - const listRiwayat = await adminEvent_funGetListAllRiwayat({ page: 1 }); return ( <> - + ); } diff --git a/src/app/dev/admin/event/child/tipe_acara/page.tsx b/src/app/dev/admin/event/child/tipe_acara/page.tsx index b905136e..cc272668 100644 --- a/src/app/dev/admin/event/child/tipe_acara/page.tsx +++ b/src/app/dev/admin/event/child/tipe_acara/page.tsx @@ -2,11 +2,11 @@ import { AdminEvent_DetailTipeAcara } from "@/app_modules/admin/event"; import { AdminEvent_getListTipeAcara } from "@/app_modules/admin/event/fun/get/get_list_tipe_acara"; export default async function Page() { - const listTipe = await AdminEvent_getListTipeAcara() + // const listTipe = await AdminEvent_getListTipeAcara() return ( <> - + ); } diff --git a/src/app/dev/admin/event/detail/detail_sponsor/page.tsx b/src/app/dev/admin/event/detail/detail_sponsor/page.tsx new file mode 100644 index 00000000..8da4fe25 --- /dev/null +++ b/src/app/dev/admin/event/detail/detail_sponsor/page.tsx @@ -0,0 +1,11 @@ +import AdminEvent_DetailSponsor from '@/app_modules/admin/event/table_status/detail_sponsor'; + +function Page() { + return ( + <> + + + ); +} + +export default Page; diff --git a/src/app/dev/admin/event/detail/publish/[id]/page.tsx b/src/app/dev/admin/event/detail/publish/[id]/page.tsx new file mode 100644 index 00000000..da2f5681 --- /dev/null +++ b/src/app/dev/admin/event/detail/publish/[id]/page.tsx @@ -0,0 +1,12 @@ +import AdminEvent_DetailPublish from '@/app_modules/admin/event/table_status/detail_publish'; +import React from 'react'; + +function Page() { + return ( + <> + + + ); +} + +export default Page; diff --git a/src/app/dev/admin/event/main/page.tsx b/src/app/dev/admin/event/main/page.tsx index abd71c1e..21e83625 100644 --- a/src/app/dev/admin/event/main/page.tsx +++ b/src/app/dev/admin/event/main/page.tsx @@ -1,26 +1,9 @@ import { AdminEvent_Main } from "@/app_modules/admin/event"; -import AdminEvent_funCountByStatusId from "@/app_modules/admin/event/fun/count/fun_count_event_by_status_id"; -import { AdminEvent_funCountRiwayat } from "@/app_modules/admin/event/fun/count/fun_count_riwayat"; -import { AdminEvent_funCountTipeAcara } from "@/app_modules/admin/event/fun/count/fun_count_tipe_acara"; export default async function Page() { - const countPublish = await AdminEvent_funCountByStatusId("1"); - const countReview = await AdminEvent_funCountByStatusId("2"); - const countDraft = await AdminEvent_funCountByStatusId("3"); - const countReject = await AdminEvent_funCountByStatusId("4"); - const countTipeAcara = await AdminEvent_funCountTipeAcara(); - const countRiwayat = await AdminEvent_funCountRiwayat(); - return ( <> - + ); } diff --git a/src/app/dev/admin/event/table/publish/page.tsx b/src/app/dev/admin/event/table/publish/page.tsx index a7c514dc..3e1641c4 100644 --- a/src/app/dev/admin/event/table/publish/page.tsx +++ b/src/app/dev/admin/event/table/publish/page.tsx @@ -1,12 +1,9 @@ import { AdminEvent_TablePublish } from "@/app_modules/admin/event"; -import { adminEvent_funGetListPublish } from "@/app_modules/admin/event/fun"; async function Page() { - const listPublish = await adminEvent_funGetListPublish({ page: 1 }); - return ( <> - + ); } diff --git a/src/app/dev/admin/event/table/reject/page.tsx b/src/app/dev/admin/event/table/reject/page.tsx index 236885b6..9bc6133d 100644 --- a/src/app/dev/admin/event/table/reject/page.tsx +++ b/src/app/dev/admin/event/table/reject/page.tsx @@ -2,11 +2,10 @@ import { AdminEvent_TableReject } from "@/app_modules/admin/event"; import { adminEvent_funGetListReject } from "@/app_modules/admin/event/fun"; export default async function Page() { - const listReject = await adminEvent_funGetListReject({ page: 1 }); return ( <> - + ); } diff --git a/src/app/dev/admin/event/table/review/page.tsx b/src/app/dev/admin/event/table/review/page.tsx index 3167dd30..b88afd26 100644 --- a/src/app/dev/admin/event/table/review/page.tsx +++ b/src/app/dev/admin/event/table/review/page.tsx @@ -1,12 +1,10 @@ import { AdminEvent_TableReview } from "@/app_modules/admin/event"; -import { adminEvent_funGetListReview } from "@/app_modules/admin/event/fun"; export default async function Page() { - const listReview = await adminEvent_funGetListReview({ page: 1 }); - + return ( <> - + ); } diff --git a/src/app/dev/admin/forum/main/page.tsx b/src/app/dev/admin/forum/main/page.tsx index 9be61059..032267b4 100644 --- a/src/app/dev/admin/forum/main/page.tsx +++ b/src/app/dev/admin/forum/main/page.tsx @@ -14,9 +14,9 @@ export default async function Page() { return ( <> ); diff --git a/src/app/dev/admin/investasi/main/page.tsx b/src/app/dev/admin/investasi/main/page.tsx index fdeee026..cf6eb9a9 100644 --- a/src/app/dev/admin/investasi/main/page.tsx +++ b/src/app/dev/admin/investasi/main/page.tsx @@ -6,10 +6,10 @@ import Admin_getTotalInvestasiByUser from "@/app_modules/admin/investasi/fun/get export default async function Page() { const listInvestasi = await Admin_funGetAllInvestasi(); - const countDraft = await Admin_CountStatusInvestasi(1); - const countReview = await Admin_CountStatusInvestasi(2); - const countPublish = await Admin_CountStatusInvestasi(3); - const countReject = await Admin_CountStatusInvestasi(4); + // const countDraft = await Admin_CountStatusInvestasi(1); + // const countReview = await Admin_CountStatusInvestasi(2); + // const countPublish = await Admin_CountStatusInvestasi(3); + // const countReject = await Admin_CountStatusInvestasi(4); const totalInvestasiByUser = await Admin_getTotalInvestasiByUser() const publishProgres = await Admin_getPublishProgresInvestasi() // console.log(targetTerbesar) @@ -18,10 +18,10 @@ export default async function Page() { <> ); diff --git a/src/app/dev/admin/main/dashboard/page.tsx b/src/app/dev/admin/main/dashboard/page.tsx index e046e03a..51820acf 100644 --- a/src/app/dev/admin/main/dashboard/page.tsx +++ b/src/app/dev/admin/main/dashboard/page.tsx @@ -3,12 +3,12 @@ import { AdminMainDashboard_CountPOrtofolio } from "@/app_modules/admin/main_das import { AdminMainDashboard_CountUser } from "@/app_modules/admin/main_dashboard/fun/count/fun_count_user"; export default async function Page() { - const countUser = await AdminMainDashboard_CountUser(); - const countPorto = await AdminMainDashboard_CountPOrtofolio(); + // const countUser = await AdminMainDashboard_CountUser(); + // const countPorto = await AdminMainDashboard_CountPOrtofolio(); // await new Promise((a, b) => { // setTimeout(a, 4000); // }); - return ; + return ; } diff --git a/src/app/dev/admin/vote/main/page.tsx b/src/app/dev/admin/vote/main/page.tsx index 6fefc7ff..cf2dd932 100644 --- a/src/app/dev/admin/vote/main/page.tsx +++ b/src/app/dev/admin/vote/main/page.tsx @@ -2,18 +2,18 @@ import { AdminVote_Main } from "@/app_modules/admin/vote"; import AdminVote_funCountByStatusId from "@/app_modules/admin/vote/fun/count/fun_count_vote_by_status_id"; export default async function Page() { - const countPublish = await AdminVote_funCountByStatusId("1"); - const countReview = await AdminVote_funCountByStatusId("2"); - const countDraft = await AdminVote_funCountByStatusId("0"); - const countReject = await AdminVote_funCountByStatusId("4"); + // const countPublish = await AdminVote_funCountByStatusId("1"); + // const countReview = await AdminVote_funCountByStatusId("2"); + // const countDraft = await AdminVote_funCountByStatusId("0"); + // const countReject = await AdminVote_funCountByStatusId("4"); return ( <> ); diff --git a/src/app/dev/donasi/create/create_donasi/page.tsx b/src/app/dev/donasi/create/create_donasi/page.tsx index aef24090..0b0aef8c 100644 --- a/src/app/dev/donasi/create/create_donasi/page.tsx +++ b/src/app/dev/donasi/create/create_donasi/page.tsx @@ -1,12 +1,5 @@ import { CreateDonasiNew } from "@/app_modules/donasi"; - export default async function Page() { - // const masterKategori = await Donasi_getMasterKategori(); - // const masterDurasi = await Donasi_getMasterDurasi(); - - return ( - // - - ); + return ; } diff --git a/src/app/dev/donasi/create/create_kabar/[id]/page.tsx b/src/app/dev/donasi/create/create_kabar/[id]/page.tsx index a9404a35..6de2e1ce 100644 --- a/src/app/dev/donasi/create/create_kabar/[id]/page.tsx +++ b/src/app/dev/donasi/create/create_kabar/[id]/page.tsx @@ -1,10 +1,9 @@ import { Donasi_CreateKabar } from "@/app_modules/donasi"; -export default async function Page({ params }: { params: { id: string } }) { - const donasiId = params.id; +export default async function Page() { return ( <> - + ); } diff --git a/src/app/dev/donasi/edit/edit_donasi/[id]/page.tsx b/src/app/dev/donasi/edit/edit_donasi/[id]/page.tsx index 923fdcf9..c99d7fab 100644 --- a/src/app/dev/donasi/edit/edit_donasi/[id]/page.tsx +++ b/src/app/dev/donasi/edit/edit_donasi/[id]/page.tsx @@ -1,15 +1,8 @@ -import { EditDonasi, EditDonasiNew } from "@/app_modules/donasi"; -import { Donasi_getMasterDurasi, Donasi_getMasterKategori } from "@/app_modules/donasi/fun"; -import { Donasi_getOneById } from "@/app_modules/donasi/fun/get/get_one_donasi_by_id"; - -export default async function Page({ params }: { params: { id: string } }) { - // const dataDonasi = await Donasi_getOneById(params.id) - // const masterKategori = await Donasi_getMasterKategori() - // const masterDurasi = await Donasi_getMasterDurasi() +import { EditDonasiNew } from "@/app_modules/donasi"; +export default async function Page() { return ( <> - {/* */} ); diff --git a/src/app/dev/event/detail/detail_sponsor/[id]/layout.tsx b/src/app/dev/event/detail/detail_sponsor/[id]/layout.tsx index 6b363920..5869b245 100644 --- a/src/app/dev/event/detail/detail_sponsor/[id]/layout.tsx +++ b/src/app/dev/event/detail/detail_sponsor/[id]/layout.tsx @@ -1,10 +1,14 @@ +import { funGetUserIdByToken } from '@/app_modules/_global/fun/get'; import LayoutEvent_DetailSponsor from '@/app_modules/event/detail/detail_sponsor/layout'; import React from 'react'; -function Layout({children} : {children: React.ReactNode}) { +async function Layout({children} : {children: React.ReactNode}) { + const userLoginId = await funGetUserIdByToken() return ( <> - {children} + + {children} + ); } diff --git a/src/app/dev/event/detail/detail_sponsor/[id]/page.tsx b/src/app/dev/event/detail/detail_sponsor/[id]/page.tsx index 1762e49e..c0e9cdde 100644 --- a/src/app/dev/event/detail/detail_sponsor/[id]/page.tsx +++ b/src/app/dev/event/detail/detail_sponsor/[id]/page.tsx @@ -1,10 +1,12 @@ +import { funGetUserIdByToken } from '@/app_modules/_global/fun/get'; import DetailSponsor_Event from '@/app_modules/event/detail/detail_sponsor'; import React from 'react'; -function Page() { +async function Page() { + const userLoginId = await funGetUserIdByToken(); return ( <> - + ); } diff --git a/src/app/dev/event/detail/kontribusi/[id]/page.tsx b/src/app/dev/event/detail/kontribusi/[id]/page.tsx index 508e14ae..9a3f6028 100644 --- a/src/app/dev/event/detail/kontribusi/[id]/page.tsx +++ b/src/app/dev/event/detail/kontribusi/[id]/page.tsx @@ -5,13 +5,12 @@ import { event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id"; export default async function Page({ params }: { params: { id: string } }) { let eventId = params.id; - const dataEvent = await event_getOneById(eventId); - const listKontributor = await Event_getListPesertaById(eventId); + // const dataEvent = await event_getOneById(eventId); + // const listKontributor = await Event_getListPesertaById(eventId); const totalPeserta = await Event_countTotalPesertaById(eventId) return ( <> diff --git a/src/app/dev/event/detail/main/[id]/page.tsx b/src/app/dev/event/detail/main/[id]/page.tsx index 62fca07e..2550c407 100644 --- a/src/app/dev/event/detail/main/[id]/page.tsx +++ b/src/app/dev/event/detail/main/[id]/page.tsx @@ -2,17 +2,15 @@ import { funGetUserIdByToken } from "@/app_modules/_global/fun/get"; import { Event_DetailMain } from "@/app_modules/event"; import { Event_countTotalPesertaById } from "@/app_modules/event/fun/count/count_total_peserta_by_id"; -export default async function Page({ params }: { params: { id: string } }) { - let eventId = params.id; +export default async function Page() { const userLoginId = await funGetUserIdByToken(); - const totalPeserta = await Event_countTotalPesertaById(eventId); + // const totalPeserta = await Event_countTotalPesertaById(eventId); return ( <> ); diff --git a/src/app/dev/event/detail/riwayat/[id]/page.tsx b/src/app/dev/event/detail/riwayat/[id]/page.tsx index a6715a97..e0259a97 100644 --- a/src/app/dev/event/detail/riwayat/[id]/page.tsx +++ b/src/app/dev/event/detail/riwayat/[id]/page.tsx @@ -9,7 +9,6 @@ export default async function Page({ params }: { params: { id: string } }) { <> ); diff --git a/src/app/dev/event/detail/sponsor/edit_sponsor/layout.tsx b/src/app/dev/event/detail/sponsor/edit_sponsor/layout.tsx new file mode 100644 index 00000000..ed430688 --- /dev/null +++ b/src/app/dev/event/detail/sponsor/edit_sponsor/layout.tsx @@ -0,0 +1,14 @@ +import Event_LayoutEditSponsor from '@/app_modules/event/detail/sponsor/edit_sponsor/layout'; +import React from 'react'; + +function Layout({ children }: { children: React.ReactNode }) { + return ( + <> + + {children} + + + ); +} + +export default Layout; diff --git a/src/app/dev/event/detail/sponsor/edit_sponsor/page.tsx b/src/app/dev/event/detail/sponsor/edit_sponsor/page.tsx new file mode 100644 index 00000000..4b3e2fb9 --- /dev/null +++ b/src/app/dev/event/detail/sponsor/edit_sponsor/page.tsx @@ -0,0 +1,12 @@ +import Event_EditSponsor from '@/app_modules/event/detail/sponsor/edit_sponsor'; +import React from 'react'; + +function Page() { + return ( + <> + + + ); +} + +export default Page; diff --git a/src/app/dev/event/detail/sponsor/metode_pembayaran/[id]/layout.tsx b/src/app/dev/event/detail/sponsor/metode_pembayaran/[id]/layout.tsx new file mode 100644 index 00000000..4874c821 --- /dev/null +++ b/src/app/dev/event/detail/sponsor/metode_pembayaran/[id]/layout.tsx @@ -0,0 +1,14 @@ +import Event_LayoutMetodePembayaran from '@/app_modules/event/detail/sponsor/metode_pembayaran/layout'; +import React from 'react'; + +function Layout({ children } : { children: React.ReactNode }) { + return ( + <> + + {children} + + + ); +} + +export default Layout; diff --git a/src/app/dev/event/detail/sponsor/metode_pembayaran/[id]/page.tsx b/src/app/dev/event/detail/sponsor/metode_pembayaran/[id]/page.tsx new file mode 100644 index 00000000..9e749bdd --- /dev/null +++ b/src/app/dev/event/detail/sponsor/metode_pembayaran/[id]/page.tsx @@ -0,0 +1,12 @@ + +import Event_MetodePembayaran from '@/app_modules/event/detail/sponsor/metode_pembayaran'; + +function Page() { + return ( + <> + + + ); +} + +export default Page; diff --git a/src/app/dev/event/detail/sponsor/nominal_sponsor/[id]/layout.tsx b/src/app/dev/event/detail/sponsor/nominal_sponsor/[id]/layout.tsx new file mode 100644 index 00000000..d3fedd39 --- /dev/null +++ b/src/app/dev/event/detail/sponsor/nominal_sponsor/[id]/layout.tsx @@ -0,0 +1,12 @@ +import Event_LayoutNominalSponsor from '@/app_modules/event/detail/sponsor/nominal_sponsor/layout'; +import React from 'react'; + +function Layout({ children }: { children: React.ReactNode }) { + return ( + <> + {children} + + ); +} + +export default Layout; diff --git a/src/app/dev/event/detail/sponsor/nominal_sponsor/[id]/page.tsx b/src/app/dev/event/detail/sponsor/nominal_sponsor/[id]/page.tsx new file mode 100644 index 00000000..1ca80c55 --- /dev/null +++ b/src/app/dev/event/detail/sponsor/nominal_sponsor/[id]/page.tsx @@ -0,0 +1,12 @@ +import Event_PilihNominalSponsor from '@/app_modules/event/detail/sponsor/nominal_sponsor'; +import React from 'react'; + +function Page() { + return ( + <> + + + ); +} + +export default Page; diff --git a/src/app/dev/event/detail/tambah_sponsor/layout.tsx b/src/app/dev/event/detail/sponsor/tambah_sponsor/[id]/layout.tsx similarity index 100% rename from src/app/dev/event/detail/tambah_sponsor/layout.tsx rename to src/app/dev/event/detail/sponsor/tambah_sponsor/[id]/layout.tsx diff --git a/src/app/dev/event/detail/tambah_sponsor/page.tsx b/src/app/dev/event/detail/sponsor/tambah_sponsor/[id]/page.tsx similarity index 100% rename from src/app/dev/event/detail/tambah_sponsor/page.tsx rename to src/app/dev/event/detail/sponsor/tambah_sponsor/[id]/page.tsx diff --git a/src/app/dev/event/invoice/[id]/layout.tsx b/src/app/dev/event/invoice/[id]/layout.tsx new file mode 100644 index 00000000..ec04b66b --- /dev/null +++ b/src/app/dev/event/invoice/[id]/layout.tsx @@ -0,0 +1,14 @@ +import Event_LayoutInvoice from '@/app_modules/event/detail/invoice/layout'; +import React from 'react'; + +function Layout({ children }: { children: React.ReactNode }) { + return ( + <> + + {children} + + + ); +} + +export default Layout; diff --git a/src/app/dev/event/invoice/[id]/page.tsx b/src/app/dev/event/invoice/[id]/page.tsx new file mode 100644 index 00000000..7574ae8b --- /dev/null +++ b/src/app/dev/event/invoice/[id]/page.tsx @@ -0,0 +1,14 @@ +import { funGetUserIdByToken } from '@/app_modules/_global/fun/get'; +import Event_Invoice from '@/app_modules/event/detail/invoice'; +import React from 'react'; + +async function Page() { + const userLoginId = await funGetUserIdByToken(); + return ( + <> + + + ); +} + +export default Page; diff --git a/src/app/dev/event/konfirmasi/[id]/page.tsx b/src/app/dev/event/konfirmasi/[id]/page.tsx index 7d8b033a..da648c02 100644 --- a/src/app/dev/event/konfirmasi/[id]/page.tsx +++ b/src/app/dev/event/konfirmasi/[id]/page.tsx @@ -1,17 +1,12 @@ import { funGetUserIdByToken } from "@/app_modules/_global/fun/get"; import Ui_Konfirmasi from "@/app_modules/event/_ui/konfirmasi"; -export default async function Page({ - params, -}: { - params: Promise<{ id: string }>; -}) { - const eventId = (await params).id; +export default async function Page() { const userLoginId = await funGetUserIdByToken(); return ( <> - + ); } diff --git a/src/app/dev/notifikasi/donasi/page.tsx b/src/app/dev/notifikasi/donasi/page.tsx index ca9f64eb..e18a8246 100644 --- a/src/app/dev/notifikasi/donasi/page.tsx +++ b/src/app/dev/notifikasi/donasi/page.tsx @@ -1,9 +1,12 @@ +import { funGetUserIdByToken } from "@/app_modules/_global/fun/get"; import { Notifikasi_UiMain } from "@/app_modules/notifikasi/_ui"; export default async function Page() { + const userLoginId = await funGetUserIdByToken(); + return ( <> - + ); } diff --git a/src/app/dev/notifikasi/semua/page.tsx b/src/app/dev/notifikasi/semua/page.tsx index ca9f64eb..aca69d02 100644 --- a/src/app/dev/notifikasi/semua/page.tsx +++ b/src/app/dev/notifikasi/semua/page.tsx @@ -1,9 +1,11 @@ +import { funGetUserIdByToken } from "@/app_modules/_global/fun/get"; import { Notifikasi_UiMain } from "@/app_modules/notifikasi/_ui"; export default async function Page() { + const userLoginId = await funGetUserIdByToken(); return ( <> - + ); } diff --git a/src/app/lib/id-derectory.ts b/src/app/lib/id-derectory.ts index dc430470..0fed8931 100644 --- a/src/app/lib/id-derectory.ts +++ b/src/app/lib/id-derectory.ts @@ -21,6 +21,10 @@ const DIRECTORY_ID = { // Job job_image: "cm0ypp6zl0003kp7jf59zuvjy", + + // Event + event_sponsor: "cm65zlbyf001udvmggnd6i0oh", + event_bukti_transfer: "cm65zlehy001wdvmgnobur2zh", }; export default DIRECTORY_ID; diff --git a/src/app/lib/limit.ts b/src/app/lib/limit.ts new file mode 100644 index 00000000..1be48f04 --- /dev/null +++ b/src/app/lib/limit.ts @@ -0,0 +1,5 @@ +import pLimit from "p-limit"; + +const global_limit = pLimit(1); + +export default global_limit; \ No newline at end of file diff --git a/src/app/lib/new_fun_user_id.ts b/src/app/lib/new_fun_user_id.ts deleted file mode 100644 index c147ff22..00000000 --- a/src/app/lib/new_fun_user_id.ts +++ /dev/null @@ -1,28 +0,0 @@ -"use server"; - -import _ from "lodash"; -import { cookies } from "next/headers"; -import { decrypt } from "../auth/_lib/decrypt"; -import backendLogger from "@/util/backendLogger"; - -export async function newFunGetUserId() { - try { - const key = process.env.NEXT_PUBLIC_BASE_SESSION_KEY; - const c = cookies().get("hipmi-key"); - - if (!c || !c?.value || _.isEmpty(c?.value) || _.isUndefined(c?.value)) { - return null; - } - - const token = c.value; - const dataUser = await decrypt({ - token: token, - encodedKey: process.env.NEXT_PUBLIC_BASE_TOKEN_KEY!, - }); - - return dataUser?.id; - } catch (error) { - backendLogger.log("Gagal mendapatkan user id", error); - return null; - } -} diff --git a/src/app/lib/prisma.ts b/src/app/lib/prisma.ts index b3e6e417..b4f18d46 100644 --- a/src/app/lib/prisma.ts +++ b/src/app/lib/prisma.ts @@ -27,6 +27,4 @@ process.on("SIGINT", async () => { process.exit(0); }); -// console.log("==> Test prisma"); - export default prisma; diff --git a/src/app/lib/router_admin/router_admin_event.ts b/src/app/lib/router_admin/router_admin_event.ts index 1fa83338..8056b233 100644 --- a/src/app/lib/router_admin/router_admin_event.ts +++ b/src/app/lib/router_admin/router_admin_event.ts @@ -3,6 +3,8 @@ export const RouterAdminEvent = { // detail detail_peserta: "/dev/admin/event/detail/peserta/", + detail_publish: "/dev/admin/event/detail/publish/", + detail_sponsor: "/dev/admin/event/detail/detail_sponsor/", // child detail_tipe_acara: "/dev/admin/event/child/tipe_acara", @@ -12,4 +14,7 @@ export const RouterAdminEvent = { table_review: "/dev/admin/event/table/review", table_publish: "/dev/admin/event/table/publish", table_reject: "/dev/admin/event/table/reject", + + + }; diff --git a/src/app/lib/router_hipmi/router_admin.ts b/src/app/lib/router_hipmi/router_admin.ts index b44b523c..c87ca56a 100644 --- a/src/app/lib/router_hipmi/router_admin.ts +++ b/src/app/lib/router_hipmi/router_admin.ts @@ -22,6 +22,7 @@ export const RouterAdminDonasi_OLD = { table_publish: "/dev/admin/donasi/table/publish", table_review: "/dev/admin/donasi/table/review", table_reject: "/dev/admin/donasi/table/reject", + table_kategori: "/dev/admin/donasi/table/kategori", // detail detail_publish: "/dev/admin/donasi/detail/publish/", diff --git a/src/app/lib/router_hipmi/router_event.ts b/src/app/lib/router_hipmi/router_event.ts index 8dcd2de6..41154204 100644 --- a/src/app/lib/router_hipmi/router_event.ts +++ b/src/app/lib/router_hipmi/router_event.ts @@ -7,7 +7,7 @@ export const RouterEvent = { riwayat: ({ id }: { id: string }) => `/dev/event/main/riwayat/${id}`, /** - * + * * @param statusId | 1 - 4 | 1: Publish, 2: Review, 3: Draft, 4: Reject * @type string */ @@ -34,17 +34,20 @@ export const RouterEvent = { detail_riwayat: "/dev/event/detail/riwayat/", //peserta - daftar_peserta: ({ id }: { id: string }) => - `/dev/event/detail/peserta/${id}`, + daftar_peserta: ({ id }: { id: string }) => `/dev/event/detail/peserta/${id}`, //sponsor - daftar_sponsor: ({ id }: { id: string }) => - `/dev/event/detail/sponsor/${id}`, - tambah_sponsor: "/dev/event/detail/tambah_sponsor/", + daftar_sponsor: ({ id }: { id: string }) => `/dev/event/detail/sponsor/${id}`, + edit_sponsor: "/dev/event/detail/sponsor/edit_sponsor/", + tambah_sponsor: ({ id }: { id: string }) => + `/dev/event/detail/sponsor/tambah_sponsor/${id}`, detail_sponsor: ({ id }: { id: string }) => `/dev/event/detail/detail_sponsor/${id}`, + nominal_sponsor: ({ id }: { id: string }) => + `/dev/event/detail/sponsor/nominal_sponsor/${id}`, - - + metode_pembayaran: ({ id }: { id: string }) => + `/dev/event/detail/sponsor/metode_pembayaran/${id}`, + invoice: ({ id }: { id: string }) => + `/dev/event/invoice/${id}`, }; - diff --git a/src/app/zz-makuro/LoadDataContoh.tsx b/src/app/zz-makuro/LoadDataContoh.tsx new file mode 100644 index 00000000..adf8a237 --- /dev/null +++ b/src/app/zz-makuro/LoadDataContoh.tsx @@ -0,0 +1,30 @@ +"use client"; +import { Stack } from "@mantine/core"; +import useSwr from "swr"; + +const fether = (url: string) => + fetch("https://jsonplaceholder.typicode.com" + url, { + cache: "force-cache", + next: { + revalidate: 60, + }, + }).then((res) => res.json()); + +export default function LoadDataContoh() { + const { data, isLoading, error, mutate, isValidating } = useSwr( + "/posts/1", + fether, + { + revalidateOnFocus: false, + revalidateOnReconnect: false, + refreshInterval: 1000, + } + ); + return ( + + {isLoading &&
Loading...
} + LoadDataContoh + {JSON.stringify(data, null, 2)} +
+ ); +} diff --git a/src/app/zz-makuro/get-data-example.ts b/src/app/zz-makuro/get-data-example.ts new file mode 100644 index 00000000..d52d9586 --- /dev/null +++ b/src/app/zz-makuro/get-data-example.ts @@ -0,0 +1,9 @@ +async function getDataExample() { + const res = await fetch("https://jsonplaceholder.typicode.com/posts", { + next: { + revalidate: 60, + }, + }); + + return res.json(); +} diff --git a/src/app/zz-makuro/page.tsx b/src/app/zz-makuro/page.tsx index 665c3a1f..a1df80ba 100644 --- a/src/app/zz-makuro/page.tsx +++ b/src/app/zz-makuro/page.tsx @@ -1,14 +1,51 @@ -"use client"; -import { useHookstate } from "@hookstate/core"; -import { Button, Stack } from "@mantine/core"; +import { Suspense } from "react"; +import LoadDataContoh from "./LoadDataContoh"; +const listMenu = [ + { + name: "Dashboard", + url: "/dashboard", + icon: "dashboard", + }, + { + name: "Event", + url: "/event", + icon: "event", + }, + { + name: "Donasi", + url: "/donasi", + icon: "donasi", + }, +]; -export default function Page() { +const fether = async (url: string) => + fetch("https://jsonplaceholder.typicode.com" + url, { + next: { + revalidate: 2, + }, + }).then(async (res) => { + const data = await res.json(); + // console.log(data); + return data; + }); +export default async function Page() { + const data = await fether("/posts/1"); + return ( - - - - +
+ {listMenu.map((item) => { + return ( + + ); + })} + {/* */} + Loading...
}> + {JSON.stringify(data, null, 2)} + + ); } diff --git a/src/app_modules/_global/color/color_pallet.ts b/src/app_modules/_global/color/color_pallet.ts index 658e509e..b44fc07c 100644 --- a/src/app_modules/_global/color/color_pallet.ts +++ b/src/app_modules/_global/color/color_pallet.ts @@ -10,7 +10,7 @@ export const MainColor = { }; export const AccentColor = { - blackgray: "#333533", + blackgray: "#333533FF", darkblue: "#002E59", blue: "#00447D", softblue: "#007CBA", @@ -19,7 +19,25 @@ export const AccentColor = { white: "#FEFFFE" }; + +export const AdminColor = { + yellow: "#FFEB99", + green: "#A7DCA5", + orange: "#F7C69B", + red: "#F4A8A8", + bgAdmin: "#182c47", + white: "#D6D9DCFF", + dividerWhite: "#D6D9DC2E", + softBlue: "#163C64FF" + +} //yellow: "#FFC300" //yellow: "#FFD60A" // white: "#FEFFFE" +// Warna Terang: #80a7c4 +// Warna Sedang: #40738d +// Warna Asli: #002e59 +// Warna Lebih Gelap: #001f3b +// Warna Tergelap: #001323 + diff --git a/src/app_modules/_global/fun/generate_seeder.ts b/src/app_modules/_global/fun/generate_seeder.ts index 988da404..3e549c78 100644 --- a/src/app_modules/_global/fun/generate_seeder.ts +++ b/src/app_modules/_global/fun/generate_seeder.ts @@ -25,8 +25,10 @@ import voting_status from "../../../bin/seeder/voting/master_status.json"; import { master_kategori_app } from "@/bin/seeder/master"; import { new_status_transaksi_investasi } from "@/bin/seeder/investasi"; import { master_nama_bank } from "@/bin/seeder/master"; +import { master_status_transaksi } from "@/bin/seeder/master"; +import pLimit from "p-limit"; -export async function generate_seeder() { +async function masterUserRole() { for (let i of userRole) { await prisma.masterUserRole.upsert({ where: { @@ -42,7 +44,10 @@ export async function generate_seeder() { }, }); } + console.log("masterUserRole success"); +} +async function seederUser() { for (let i of userSeeder) { await prisma.user.upsert({ where: { @@ -62,7 +67,10 @@ export async function generate_seeder() { }, }); } + console.log("user seeder success"); +} +async function masterBisnis() { for (let i of bidangBisnis) { await prisma.masterBidangBisnis.upsert({ where: { @@ -78,7 +86,10 @@ export async function generate_seeder() { }, }); } + console.log("masterBisnis success"); +} +async function masterPencarianInvestor() { for (let i of pencarianInvestor) { await prisma.masterPencarianInvestor.upsert({ where: { @@ -95,6 +106,10 @@ export async function generate_seeder() { }); } + console.log("masterPencarianInvestor success"); +} + +async function masterPembagianDeviden() { for (let i of pembagianDeviden) { await prisma.masterPembagianDeviden.upsert({ where: { @@ -111,6 +126,10 @@ export async function generate_seeder() { }); } + console.log("masterPembagianDeviden success"); +} + +async function masterPeriodeDeviden() { for (let i of periodeDeviden) { await prisma.masterPeriodeDeviden.upsert({ where: { @@ -127,6 +146,10 @@ export async function generate_seeder() { }); } + console.log("masterPeriodeDeviden success"); +} + +async function masterStatusInvestasi() { for (let i of statusInvestasi) { await prisma.masterStatusInvestasi.upsert({ where: { @@ -145,6 +168,10 @@ export async function generate_seeder() { }); } + console.log("masterStatusInvestasi success"); +} + +async function masterNamaBank() { for (let i of master_nama_bank) { await prisma.masterBank.upsert({ where: { @@ -164,7 +191,11 @@ export async function generate_seeder() { }, }); } - + + console.log("masterNamaBank success"); +} + +async function masterStatusTransaksiInvestasi() { for (let i of statusTransaksiInvestasi) { await prisma.masterStatusTransaksiInvestasi.upsert({ where: { @@ -183,6 +214,10 @@ export async function generate_seeder() { }); } + console.log("masterStatusTransaksiInvestasi success"); +} + +async function masterProgressInvestasi() { for (let i of jenisProgres) { await prisma.masterProgresInvestasi.upsert({ where: { @@ -198,6 +233,10 @@ export async function generate_seeder() { }); } + console.log("masterProgressInvestasi success"); +} + +async function masterStatusDonasi() { for (let d of donasi_status) { await prisma.donasiMaster_StatusDonasi.upsert({ where: { @@ -213,6 +252,10 @@ export async function generate_seeder() { }); } + console.log("masterStatusDonasi success"); +} + +async function masterKategoriDonasi() { for (let d of donasi_kategori) { await prisma.donasiMaster_Kategori.upsert({ where: { @@ -228,6 +271,10 @@ export async function generate_seeder() { }); } + console.log("masterKategoriDonasi success"); +} + +async function masterDurasiDonasi() { for (let d of donasi_durasi) { await prisma.donasiMaster_Durasi.upsert({ where: { @@ -243,6 +290,10 @@ export async function generate_seeder() { }); } + console.log("masterDurasiDonasi success"); +} + +async function masterDonasiNamaBank() { for (let i of donasi_namaBank) { await prisma.donasiMaster_Bank.upsert({ where: { @@ -261,6 +312,10 @@ export async function generate_seeder() { }); } + console.log("masterDonasiBank success"); +} + +async function masterDonasiStatusInvoice() { for (let d of donasi_status_invoice) { await prisma.donasiMaster_StatusInvoice.upsert({ where: { @@ -276,6 +331,10 @@ export async function generate_seeder() { }); } + console.log("masterDonasiStatusInvoice success"); +} + +async function masterEventStatus() { for (let e of event_status) { await prisma.eventMaster_Status.upsert({ where: { @@ -291,6 +350,10 @@ export async function generate_seeder() { }); } + console.log("masterEventStatus success"); +} + +async function masterEventTipeAcara() { for (let e of event_tipe_acara) { await prisma.eventMaster_TipeAcara.upsert({ where: { @@ -306,6 +369,10 @@ export async function generate_seeder() { }); } + console.log("masterEventTipeAcara success"); +} + +async function masterVotingStatus() { for (let v of voting_status) { await prisma.voting_Status.upsert({ where: { @@ -321,6 +388,10 @@ export async function generate_seeder() { }); } + console.log("masterVotingStatus success"); +} + +async function masterStatusProses() { for (let m of master_status) { await prisma.masterStatus.upsert({ where: { @@ -336,6 +407,10 @@ export async function generate_seeder() { }); } + console.log("masterStatusProses success"); +} + +async function masterForumKategoriReport() { for (let m of forum_kategori_report) { await prisma.forumMaster_KategoriReport.upsert({ where: { @@ -352,6 +427,10 @@ export async function generate_seeder() { }); } + console.log("masterForumKategoriReport success"); +} + +async function masterForumStatusPosting() { for (let s of forum_status_posting) { await prisma.forumMaster_StatusPosting.upsert({ where: { @@ -366,6 +445,10 @@ export async function generate_seeder() { }); } + console.log("masterForumStatusPosting success"); +} + +async function masterCollaborationIndustri() { for (let p of collaboration_industri) { await prisma.projectCollaborationMaster_Industri.upsert({ where: { @@ -380,6 +463,10 @@ export async function generate_seeder() { }); } + console.log("masterCollaborationIndustri success"); +} + +async function masterCollaborationStatus() { for (let p of collaboration_status) { await prisma.projectCollaborationMaster_Status.upsert({ where: { @@ -394,6 +481,10 @@ export async function generate_seeder() { }); } + console.log("masterCollaborationStatus success"); +} + +async function seederNomorAdmin() { for (let a of nomor_admin) { await prisma.nomorAdmin.upsert({ where: { @@ -410,6 +501,10 @@ export async function generate_seeder() { }); } + console.log("seederNomorAdmin success"); +} + +async function masterKategoriApp() { for (let a of master_kategori_app) { await prisma.masterKategoriApp.upsert({ where: { @@ -426,6 +521,10 @@ export async function generate_seeder() { }); } + console.log("masterKategoriApp success"); +} + +async function masterInvestasiNewTransaksiStatus() { for (let a of new_status_transaksi_investasi) { await prisma.investasiMaster_StatusInvoice.upsert({ where: { @@ -442,5 +541,66 @@ export async function generate_seeder() { }); } + console.log("masterInvestasiNewTransaksiStatus success"); +} + +async function masterStatusTransaksi() { + for (let a of master_status_transaksi) { + await prisma.masterStatusTransaksi.upsert({ + where: { + id: a.id, + }, + create: { + id: a.id, + name: a.name, + }, + update: { + id: a.id, + name: a.name, + }, + }); + } + + console.log("masterStatusTransaksi success"); +} + +const listSeederQueue = [ + masterUserRole, + seederUser, + masterBisnis, + masterPencarianInvestor, + masterPembagianDeviden, + masterPeriodeDeviden, + masterStatusInvestasi, + masterNamaBank, + masterStatusTransaksiInvestasi, + masterProgressInvestasi, + masterStatusDonasi, + masterKategoriDonasi, + masterDurasiDonasi, + masterDonasiNamaBank, + masterDonasiStatusInvoice, + masterEventStatus, + masterEventTipeAcara, + masterVotingStatus, + masterStatusProses, + masterForumKategoriReport, + masterForumStatusPosting, + masterCollaborationIndustri, + masterCollaborationStatus, + seederNomorAdmin, + masterKategoriApp, + masterInvestasiNewTransaksiStatus, + masterStatusTransaksi, +]; +const limit = pLimit(1); + +export async function generate_seeder() { + try { + await Promise.all(listSeederQueue.map((fn) => limit(fn))); + } catch (error) { + console.error("error generate seeder", error); + } + return { status: 200, success: true }; } diff --git a/src/app_modules/_global/fun/generete_seeder.back.txt b/src/app_modules/_global/fun/generete_seeder.back.txt new file mode 100644 index 00000000..52a39d86 --- /dev/null +++ b/src/app_modules/_global/fun/generete_seeder.back.txt @@ -0,0 +1,465 @@ +import prisma from "@/app/lib/prisma"; +import bidangBisnis from "../../../bin/seeder/bidang_bisnis.json"; +import collaboration_industri from "../../../bin/seeder/colab/master_industri.json"; +import collaboration_status from "../../../bin/seeder/colab/master_status.json"; +import donasi_namaBank from "../../../bin/seeder/donasi/master_bank.json"; +import donasi_durasi from "../../../bin/seeder/donasi/master_durasi.json"; +import donasi_kategori from "../../../bin/seeder/donasi/master_kategori.json"; +import donasi_status from "../../../bin/seeder/donasi/master_status.json"; +import donasi_status_invoice from "../../../bin/seeder/donasi/master_status_invoice.json"; +import event_status from "../../../bin/seeder/event/master_status.json"; +import event_tipe_acara from "../../../bin/seeder/event/master_tipe_acara.json"; +import forum_kategori_report from "../../../bin/seeder/forum/master_report.json"; +import forum_status_posting from "../../../bin/seeder/forum/master_status.json"; +import jenisProgres from "../../../bin/seeder/investasi/master_progres.json"; +import pembagianDeviden from "../../../bin/seeder/investasi/pembagian_deviden.json"; +import pencarianInvestor from "../../../bin/seeder/investasi/pencarian_investor.json"; +import periodeDeviden from "../../../bin/seeder/investasi/periode_deviden.json"; +import statusInvestasi from "../../../bin/seeder/investasi/status_investasi.json"; +import statusTransaksiInvestasi from "../../../bin/seeder/investasi/status_transaksi_investasi.json"; +import master_status from "../../../bin/seeder/master_status.json"; +import nomor_admin from "../../../bin/seeder/nomor_admin.json"; +import userRole from "../../../bin/seeder/user_role.json"; +import userSeeder from "../../../bin/seeder/user_seeder.json"; +import voting_status from "../../../bin/seeder/voting/master_status.json"; +import { master_kategori_app } from "@/bin/seeder/master"; +import { new_status_transaksi_investasi } from "@/bin/seeder/investasi"; +import { master_nama_bank } from "@/bin/seeder/master"; +import pLimit from "p-limit"; + +// PAKEK p-limit + +async function masterUserRole() { + for (let i of userRole) { + await prisma.masterUserRole.upsert({ + where: { + id: i.id.toString(), + }, + update: { + id: i.id.toString(), + name: i.name, + }, + create: { + id: i.id.toString(), + name: i.name, + }, + }); + } + await new Promise((resolve) => setTimeout(resolve, 10000)); + console.log("masterUserRole success"); +} + +async function user() { + for (let i of userSeeder) { + await prisma.user.upsert({ + where: { + nomor: i.nomor, + }, + create: { + nomor: i.nomor, + username: i.name, + masterUserRoleId: i.masterUserRoleId, + active: i.active, + }, + update: { + nomor: i.nomor, + username: i.name, + masterUserRoleId: i.masterUserRoleId, + active: i.active, + }, + }); + } + console.log("user success"); +} + +const listAntrean = [masterUserRole, user]; +const limit = pLimit(1); + +(async () => { + console.log("start generate seeder"); + await Promise.all(listAntrean.map((fn) => limit(fn))); + console.log("success generate seeder"); +})(); + +export async function generate_seeder() { + for (let i of bidangBisnis) { + await prisma.masterBidangBisnis.upsert({ + where: { + id: i.id.toString(), + }, + update: { + id: i.id.toString(), + name: i.name, + }, + create: { + id: i.id.toString(), + name: i.name, + }, + }); + } + + for (let i of pencarianInvestor) { + await prisma.masterPencarianInvestor.upsert({ + where: { + id: i.id.toString(), + }, + update: { + id: i.id.toString(), + name: i.name, + }, + create: { + id: i.id.toString(), + name: i.name, + }, + }); + } + + for (let i of pembagianDeviden) { + await prisma.masterPembagianDeviden.upsert({ + where: { + id: i.id.toString(), + }, + update: { + id: i.id.toString(), + name: i.name, + }, + create: { + id: i.id.toString(), + name: i.name, + }, + }); + } + + for (let i of periodeDeviden) { + await prisma.masterPeriodeDeviden.upsert({ + where: { + id: i.id.toString(), + }, + update: { + id: i.id.toString(), + name: i.name, + }, + create: { + id: i.id.toString(), + name: i.name, + }, + }); + } + + for (let i of statusInvestasi) { + await prisma.masterStatusInvestasi.upsert({ + where: { + id: i.id, + }, + create: { + id: i.id, + name: i.name, + color: i.color, + }, + update: { + id: i.id, + name: i.name, + color: i.color, + }, + }); + } + + for (let i of master_nama_bank) { + await prisma.masterBank.upsert({ + where: { + id: i.id.toString(), + }, + create: { + id: i.id.toString(), + namaBank: i.namaBank, + namaAkun: i.namaAkun, + norek: i.norek.toString(), + }, + update: { + id: i.id.toString(), + namaBank: i.namaBank, + namaAkun: i.namaAkun, + norek: i.norek.toString(), + }, + }); + } + + for (let i of statusTransaksiInvestasi) { + await prisma.masterStatusTransaksiInvestasi.upsert({ + where: { + id: i.id, + }, + create: { + id: i.id, + name: i.name, + color: i.color, + }, + update: { + id: i.id, + name: i.name, + color: i.color, + }, + }); + } + + for (let i of jenisProgres) { + await prisma.masterProgresInvestasi.upsert({ + where: { + id: i.id, + }, + create: { + id: i.id, + name: i.name, + }, + update: { + name: i.name, + }, + }); + } + + for (let d of donasi_status) { + await prisma.donasiMaster_StatusDonasi.upsert({ + where: { + id: d.id, + }, + create: { + id: d.id, + name: d.name, + }, + update: { + name: d.name, + }, + }); + } + + for (let d of donasi_kategori) { + await prisma.donasiMaster_Kategori.upsert({ + where: { + id: d.id, + }, + create: { + id: d.id, + name: d.name, + }, + update: { + name: d.name, + }, + }); + } + + for (let d of donasi_durasi) { + await prisma.donasiMaster_Durasi.upsert({ + where: { + id: d.id, + }, + create: { + id: d.id, + name: d.name, + }, + update: { + name: d.name, + }, + }); + } + + for (let i of donasi_namaBank) { + await prisma.donasiMaster_Bank.upsert({ + where: { + id: i.id, + }, + create: { + id: i.id, + name: i.name, + norek: i.norek, + }, + update: { + id: i.id, + name: i.name, + norek: i.norek, + }, + }); + } + + for (let d of donasi_status_invoice) { + await prisma.donasiMaster_StatusInvoice.upsert({ + where: { + id: d.id, + }, + create: { + id: d.id, + name: d.name, + }, + update: { + name: d.name, + }, + }); + } + + for (let e of event_status) { + await prisma.eventMaster_Status.upsert({ + where: { + id: e.id, + }, + create: { + id: e.id, + name: e.name, + }, + update: { + name: e.name, + }, + }); + } + + for (let e of event_tipe_acara) { + await prisma.eventMaster_TipeAcara.upsert({ + where: { + id: e.id, + }, + create: { + id: e.id, + name: e.name, + }, + update: { + name: e.name, + }, + }); + } + + for (let v of voting_status) { + await prisma.voting_Status.upsert({ + where: { + id: v.id, + }, + create: { + id: v.id, + name: v.name, + }, + update: { + name: v.name, + }, + }); + } + + for (let m of master_status) { + await prisma.masterStatus.upsert({ + where: { + id: m.id, + }, + create: { + id: m.id, + name: m.name, + }, + update: { + name: m.name, + }, + }); + } + + for (let m of forum_kategori_report) { + await prisma.forumMaster_KategoriReport.upsert({ + where: { + id: m.id as number, + }, + create: { + title: m.title, + deskripsi: m.deskripsi, + }, + update: { + title: m.title, + deskripsi: m.deskripsi, + }, + }); + } + + for (let s of forum_status_posting) { + await prisma.forumMaster_StatusPosting.upsert({ + where: { + id: s.id, + }, + create: { + status: s.status, + }, + update: { + status: s.status, + }, + }); + } + + for (let p of collaboration_industri) { + await prisma.projectCollaborationMaster_Industri.upsert({ + where: { + id: p.id, + }, + create: { + name: p.name, + }, + update: { + name: p.name, + }, + }); + } + + for (let p of collaboration_status) { + await prisma.projectCollaborationMaster_Status.upsert({ + where: { + id: p.id, + }, + create: { + name: p.name, + }, + update: { + name: p.name, + }, + }); + } + + for (let a of nomor_admin) { + await prisma.nomorAdmin.upsert({ + where: { + id: a.id, + }, + create: { + id: a.id, + nomor: a.nomor, + }, + update: { + id: a.id, + nomor: a.nomor, + }, + }); + } + + for (let a of master_kategori_app) { + await prisma.masterKategoriApp.upsert({ + where: { + id: a.id, + }, + create: { + id: a.id, + name: a.name, + }, + update: { + id: a.id, + name: a.name, + }, + }); + } + + for (let a of new_status_transaksi_investasi) { + await prisma.investasiMaster_StatusInvoice.upsert({ + where: { + id: a.id, + }, + create: { + id: a.id, + name: a.name, + }, + update: { + id: a.id, + name: a.name, + }, + }); + } + + return { status: 200, success: true }; +} diff --git a/src/app_modules/_global/lib/api_master.ts b/src/app_modules/_global/lib/api_master.ts new file mode 100644 index 00000000..7443c12e --- /dev/null +++ b/src/app_modules/_global/lib/api_master.ts @@ -0,0 +1,19 @@ +export { apiGetMasterBank }; + +const apiGetMasterBank = async () => { + const { token } = await fetch("/api/get-cookie").then((res) => res.json()); + if (!token) return await token.json().catch(() => null); + + const respone = await fetch(`/api/master/bank`, { + headers: { + "Content-Type": "application/json", + Accept: "application/json", + "Access-Control-Allow-Origin": "*", + Authorization: `Bearer ${token}`, + }, + }); + return await respone.json().catch(() => null); +}; + + + diff --git a/src/app_modules/_global/lib/api_user.ts b/src/app_modules/_global/lib/api_user.ts index b21ad919..2503f6f8 100644 --- a/src/app_modules/_global/lib/api_user.ts +++ b/src/app_modules/_global/lib/api_user.ts @@ -11,7 +11,7 @@ export const apiGetUserId = async () => { }, }); - console.log("Ini di pemanggilan API",await response.json()); + console.log("Ini di pemanggilan API", await response.json()); if (!response.ok) return null; const data: Record = await response.json(); @@ -37,3 +37,24 @@ export const apiGetACtivationUser = async () => { }); return await response.json().catch(() => null); }; + +export const apiGetAllUserWithExceptId = async ({ + exceptId, +}: { + exceptId?: string; +}) => { + const { token } = await fetch("/api/get-cookie").then((res) => res.json()); + if (!token) return await token.json().catch(() => null); + + const isExceptId = exceptId ? `?except-id=${exceptId}` : ""; + + const response = await fetch(`/api/user/all${isExceptId}`, { + headers: { + "Content-Type": "application/json", + Accept: "application/json", + "Access-Control-Allow-Origin": "*", + Authorization: `Bearer ${token}`, + }, + }); + return await response.json().catch(() => null); +}; diff --git a/src/app_modules/_global/ui/ui_drawer.tsx b/src/app_modules/_global/ui/ui_drawer.tsx index fad1cd9d..6129be67 100644 --- a/src/app_modules/_global/ui/ui_drawer.tsx +++ b/src/app_modules/_global/ui/ui_drawer.tsx @@ -77,7 +77,7 @@ export default function UIGlobal_Drawer({ {component.map((e, i) => ( - { setPageId(e?.id); setIsLoading(true); diff --git a/src/app_modules/_global/ui/ui_drawer_custom.tsx b/src/app_modules/_global/ui/ui_drawer_custom.tsx index 034670b2..059ae4bd 100644 --- a/src/app_modules/_global/ui/ui_drawer_custom.tsx +++ b/src/app_modules/_global/ui/ui_drawer_custom.tsx @@ -25,7 +25,7 @@ export default function UIGlobal_DrawerCustom({ }: { opened: boolean; close: () => void; - component: React.ReactNode; + component: React.ReactNode; }) { return ( <> diff --git a/src/app_modules/admin/_admin_global/_component/comp_admin_modal_publish.tsx b/src/app_modules/admin/_admin_global/_component/comp_admin_modal_publish.tsx new file mode 100644 index 00000000..d962a119 --- /dev/null +++ b/src/app_modules/admin/_admin_global/_component/comp_admin_modal_publish.tsx @@ -0,0 +1,34 @@ +import { AdminColor } from '@/app_modules/_global/color/color_pallet'; +import { Group, Modal, Stack } from '@mantine/core'; +import React from 'react'; + +function Admin_ComponentModalPublish({ onClose, opened, title, buttonKiri, buttonKanan, }: { + onClose: () => void; + opened: any; + title: string; + buttonKiri: React.ReactNode; + buttonKanan: React.ReactNode; +}) { + return ( + <> + + + + {buttonKiri} + {buttonKanan} + + + + + ); +} + +export default Admin_ComponentModalPublish; diff --git a/src/app_modules/admin/_admin_global/_component/comp_admin_modal_report.tsx b/src/app_modules/admin/_admin_global/_component/comp_admin_modal_report.tsx index aed01faf..9abdc037 100644 --- a/src/app_modules/admin/_admin_global/_component/comp_admin_modal_report.tsx +++ b/src/app_modules/admin/_admin_global/_component/comp_admin_modal_report.tsx @@ -1,5 +1,6 @@ "use client"; +import { AdminColor } from "@/app_modules/_global/color/color_pallet"; import { Group, Modal, Stack, Textarea } from "@mantine/core"; import React from "react"; @@ -25,6 +26,8 @@ export function Admin_ComponentModalReport({ return ( <> ({ + skeleton: { + '&::before': { + backgroundColor: "#1F5B9E", + }, + '&::after': { + backgroundColor: "#0F3055", + }, + }, +})); + +const CustomSkeletonAdmin: React.FC = ({ + isLoading = true, + className, + ...props +}) => { + const { classes, cx } = useStyles(); + return ( + + ); +}; + +export default CustomSkeletonAdmin; \ No newline at end of file diff --git a/src/app_modules/admin/_admin_global/_component/skeleton/main_dashboard_skeleton.tsx b/src/app_modules/admin/_admin_global/_component/skeleton/main_dashboard_skeleton.tsx new file mode 100644 index 00000000..47a7d59e --- /dev/null +++ b/src/app_modules/admin/_admin_global/_component/skeleton/main_dashboard_skeleton.tsx @@ -0,0 +1,53 @@ +import { MainColor, AccentColor } from '@/app_modules/_global/color'; +import { AdminColor } from '@/app_modules/_global/color/color_pallet'; +import { Flex, Grid, Paper, Stack, Text, ThemeIcon, Title } from '@mantine/core'; +import React from 'react'; +import CustomSkeletonAdmin from './customSkeletonAdmin'; +import ComponentAdminGlobal_HeaderTamplate from '../../header_tamplate'; +import { IconFileText, IconUsers } from '@tabler/icons-react'; + +function MainDashboardSkeleton() { + const listBox = [ + { + id: 1, + name: "User", + jumlah: "", + link: "", + icon: + }, + { + id: 2, + name: "Portofolio", + jumlah: "countPortofolio", + link: "", + icon: + }, + ]; + return ( + <> + + + + {listBox.map((e) => ( + + + + {e.name} + + + {e.icon} + + + + + ))} + + + {/* */} + + + + + ); +} +export default MainDashboardSkeleton; diff --git a/src/app_modules/admin/_admin_global/_component/title_page.tsx b/src/app_modules/admin/_admin_global/_component/title_page.tsx index adf4b7f1..804666de 100644 --- a/src/app_modules/admin/_admin_global/_component/title_page.tsx +++ b/src/app_modules/admin/_admin_global/_component/title_page.tsx @@ -1,5 +1,6 @@ "use client"; +import { AdminColor } from "@/app_modules/_global/color/color_pallet"; import { Group, Title, TextInput } from "@mantine/core"; import { IconSearch } from "@tabler/icons-react"; import React from "react"; @@ -17,11 +18,11 @@ export function ComponentAdminGlobal_TitlePage({ <> - {name} + {name} {component ? component : ""} diff --git a/src/app_modules/admin/_admin_global/back_button.tsx b/src/app_modules/admin/_admin_global/back_button.tsx index 3012652a..a25f4cc7 100644 --- a/src/app_modules/admin/_admin_global/back_button.tsx +++ b/src/app_modules/admin/_admin_global/back_button.tsx @@ -1,5 +1,6 @@ "use client"; +import { AccentColor, AdminColor } from "@/app_modules/_global/color/color_pallet"; import { Group, Button, Loader } from "@mantine/core"; import { IconChevronLeft } from "@tabler/icons-react"; import { useRouter } from "next/navigation"; @@ -17,7 +18,7 @@ export default function AdminGlobal_ComponentBackButton({ <>