
SET transaction_timeout = 0;

--
-- TOC entry 2 (class 3079 OID 41019)
-- Name: pgcrypto; Type: EXTENSION; Schema: -; Owner: -
--

CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public;


--
-- TOC entry 5008 (class 0 OID 0)
-- Dependencies: 2
-- Name: EXTENSION pgcrypto; Type: COMMENT; Schema: -; Owner: 
--

COMMENT ON EXTENSION pgcrypto IS 'cryptographic functions';




--
-- TOC entry 228 (class 1259 OID 41057)
-- Name: admins_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.admins_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.admins_id_seq OWNER TO postgres;

--
-- TOC entry 5009 (class 0 OID 0)
-- Dependencies: 228
-- Name: admins_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.admins_id_seq OWNED BY public.admins.id;


--
-- TOC entry 225 (class 1259 OID 40991)
-- Name: events; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.events (
    id integer NOT NULL,
    title character varying(255) NOT NULL,
    image_url text,
    start_date date,
    end_date date,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.events OWNER TO postgres;

--
-- TOC entry 224 (class 1259 OID 40990)
-- Name: events_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.events_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.events_id_seq OWNER TO postgres;

--
-- TOC entry 5010 (class 0 OID 0)
-- Dependencies: 224
-- Name: events_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.events_id_seq OWNED BY public.events.id;


--
-- TOC entry 221 (class 1259 OID 40962)
-- Name: offers; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.offers (
    id integer NOT NULL,
    title character varying(255) NOT NULL,
    image_url text,
    old_price numeric(10,2),
    new_price numeric(10,2),
    is_featured boolean DEFAULT false,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    active_until timestamp without time zone
);


ALTER TABLE public.offers OWNER TO postgres;

--
-- TOC entry 220 (class 1259 OID 40961)
-- Name: offers_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.offers_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.offers_id_seq OWNER TO postgres;

--
-- TOC entry 5011 (class 0 OID 0)
-- Dependencies: 220
-- Name: offers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.offers_id_seq OWNED BY public.offers.id;


--
-- TOC entry 227 (class 1259 OID 41004)
-- Name: settings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.settings (
    id integer NOT NULL,
    magazine_title character varying(255),
    website_url text,
    google_review_url text,
    primary_color character varying(20),
    secondary_color character varying(20),
    logo_url text,
    app_icon_url text,
    background_color character varying(20),
    header_color character varying(20),
    title_color character varying(20),
    price_color character varying(20),
    button_color character varying(20),
    discount_color character varying(20),
    show_slider boolean DEFAULT true,
    show_events boolean DEFAULT true,
    show_featured boolean DEFAULT true,
    show_daily boolean DEFAULT true,
    show_update_time boolean DEFAULT true,
    slider_image_seconds integer DEFAULT 10,
    install_icon_color character varying(20),
    share_icon_color character varying(20),
    location_icon_color character varying(20),
    product_title_color character varying(20),
    old_price_color character varying(20),
    magazine_title_color character varying(20),
    featured_card_color character varying(20),
    daily_card_color character varying(20)
);


ALTER TABLE public.settings OWNER TO postgres;

--
-- TOC entry 226 (class 1259 OID 41003)
-- Name: settings_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.settings_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.settings_id_seq OWNER TO postgres;

--
-- TOC entry 5012 (class 0 OID 0)
-- Dependencies: 226
-- Name: settings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.settings_id_seq OWNED BY public.settings.id;


--
-- TOC entry 223 (class 1259 OID 40976)
-- Name: sliders; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.sliders (
    id integer NOT NULL,
    media_url text NOT NULL,
    media_type character varying(20) NOT NULL,
    is_active boolean DEFAULT true,
    sort_order integer DEFAULT 0,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.sliders OWNER TO postgres;

--
-- TOC entry 222 (class 1259 OID 40975)
-- Name: sliders_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.sliders_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.sliders_id_seq OWNER TO postgres;

--
-- TOC entry 5013 (class 0 OID 0)
-- Dependencies: 222
-- Name: sliders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.sliders_id_seq OWNED BY public.sliders.id;


--
-- TOC entry 4821 (class 2604 OID 40994)
-- Name: events id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.events ALTER COLUMN id SET DEFAULT nextval('public.events_id_seq'::regclass);


--
-- TOC entry 4813 (class 2604 OID 40965)
-- Name: offers id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.offers ALTER COLUMN id SET DEFAULT nextval('public.offers_id_seq'::regclass);


--
-- TOC entry 4824 (class 2604 OID 41007)
-- Name: settings id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.settings ALTER COLUMN id SET DEFAULT nextval('public.settings_id_seq'::regclass);


--
-- TOC entry 4817 (class 2604 OID 40979)
-- Name: sliders id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.sliders ALTER COLUMN id SET DEFAULT nextval('public.sliders_id_seq'::regclass);

--
-- TOC entry 4998 (class 0 OID 40991)
-- Dependencies: 225
-- Data for Name: events; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.events (id, title, image_url, start_date, end_date, is_active, created_at) FROM stdin;
15	تحدي الطبخ	/uploads/compressed-1781041021779.jpg	2026-06-10	2026-06-24	t	2026-06-10 00:37:27.27932
16	ميزة نقاطي	/uploads/compressed-1781041055669.jpg	2026-06-10	2026-06-23	t	2026-06-10 00:37:54.102287
17	اربح آيفون 18	/uploads/compressed-1781041079258.jpg	2026-06-10	2026-06-22	t	2026-06-10 00:38:19.43644
18	تابع مجلة عروضنا	/uploads/compressed-1781041106388.jpg	2026-06-10	2026-06-21	t	2026-06-10 00:38:42.921341
19	جائزة عشوائية اليوم	/uploads/compressed-1781041130125.jpg	2026-06-09	2026-06-09	t	2026-06-10 00:39:08.065753
\.


--
-- TOC entry 4994 (class 0 OID 40962)
-- Dependencies: 221
-- Data for Name: offers; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.offers (id, title, image_url, old_price, new_price, is_featured, is_active, created_at, active_until) FROM stdin;
17	فرامة لحم 2L	/uploads/compressed-1781027337767.jpg	30.00	20.85	f	t	2026-06-09 20:49:32.600062	2026-06-16 18:05:45.463724
16	كورنيفلكس 500g	/uploads/compressed-1781027300920.jpg	26.00	17.00	t	t	2026-06-09 20:48:51.881372	2026-06-16 18:05:48.353025
15	دجاج الوطنية 1000g	/uploads/compressed-1781027270265.jpg	19.00	6.85	t	t	2026-06-09 20:48:12.877175	2026-06-16 18:05:50.594526
14	حليب السعودية 1ك	/uploads/compressed-1781027227239.jpg	60.00	25.00	t	t	2026-06-09 20:47:42.384783	2026-06-16 18:05:53.042742
13	رز ابو كاس 5kg	/uploads/compressed-1781027191012.jpg	35.00	22.00	f	t	2026-06-09 20:46:58.660547	2026-06-16 18:05:56.43234
12	موز جيزاني 1kg	/uploads/compressed-1781027166026.jpg	10.00	1.85	f	t	2026-06-09 20:46:26.338226	2026-06-16 18:05:57.990826
11	قشطة ماليتا	/uploads/compressed-1781027131578.jpg	3.50	0.85	f	t	2026-06-09 20:45:57.46044	2026-06-16 18:06:00.613604
10	معجون طماطم	/uploads/compressed-1781027104796.jpg	33.00	21.00	f	t	2026-06-09 20:45:22.120206	2026-06-16 18:06:02.642324
25	غلاية زجاجية	/uploads/compressed-1781041374136.jpg	49.00	17.00	t	t	2026-06-10 00:43:19.044341	2026-06-16 18:05:25.274741
24	مكنسة كهربائية 2000w	/uploads/compressed-1781041345788.jpg	109.00	59.00	t	t	2026-06-10 00:42:49.601766	2026-06-16 18:05:28.553483
23	كاوية ملابس بخار	/uploads/compressed-1781041321887.jpg	80.00	39.00	t	t	2026-06-10 00:42:21.306183	2026-06-16 18:05:31.067249
22	2 ريحة ملابس persil	/uploads/compressed-1781029074481.jpg	27.00	19.85	f	t	2026-06-09 21:18:36.200481	2026-06-16 18:05:33.55219
21	صابون اكسترا وايت 7kg	/uploads/compressed-1781029029463.jpg	55.00	32.00	f	t	2026-06-09 21:17:45.371751	2026-06-16 18:05:35.839509
20	كلوركس 1.89L	/uploads/compressed-1781028974471.jpg	16.00	6.85	f	t	2026-06-09 21:17:01.959317	2026-06-16 18:05:38.331884
19	العملاق 1L	/uploads/compressed-1781028942730.jpg	20.00	12.50	f	t	2026-06-09 21:16:07.591039	2026-06-16 18:05:40.472217
18	قدر ضغط 2L	/uploads/compressed-1781028892016.jpg	47.00	32.00	f	t	2026-06-09 21:15:36.094469	2026-06-16 18:05:43.075234
\.


--
-- TOC entry 5000 (class 0 OID 41004)
-- Dependencies: 227
-- Data for Name: settings; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.settings (id, magazine_title, website_url, google_review_url, primary_color, secondary_color, logo_url, app_icon_url, background_color, header_color, title_color, price_color, button_color, discount_color, show_slider, show_events, show_featured, show_daily, show_update_time, slider_image_seconds, install_icon_color, share_icon_color, location_icon_color, product_title_color, old_price_color, magazine_title_color, featured_card_color, daily_card_color) FROM stdin;
1	مجلة عروض أيمن مارك	https://maps.app.goo.gl/FKYFUh2dWqyejbZN6?g_st=ac		\N	\N			#f5fffa	#150628	#000000	#ebd700	\N	#ff7b00	t	t	t	t	t	10	#2c302f	#2c302f	#2c302f	#000000	#797777	#ffffff	#ffffff	#ffffff
\.


--
-- TOC entry 4996 (class 0 OID 40976)
-- Dependencies: 223
-- Data for Name: sliders; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.sliders (id, media_url, media_type, is_active, sort_order, created_at) FROM stdin;
8	/uploads/1781031792960-WhatsApp Image 2026-06-09 at 10.02.49 PM.jpeg	image	t	0	2026-06-09 22:03:12.968794
\.



--
-- TOC entry 4839 (class 2606 OID 41002)
-- Name: events events_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.events
    ADD CONSTRAINT events_pkey PRIMARY KEY (id);


--
-- TOC entry 4835 (class 2606 OID 40974)
-- Name: offers offers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.offers
    ADD CONSTRAINT offers_pkey PRIMARY KEY (id);


--
-- TOC entry 4841 (class 2606 OID 41012)
-- Name: settings settings_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.settings
    ADD CONSTRAINT settings_pkey PRIMARY KEY (id);


--
-- TOC entry 4837 (class 2606 OID 40989)
-- Name: sliders sliders_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.sliders
    ADD CONSTRAINT sliders_pkey PRIMARY KEY (id);