270 lines
10 KiB
SQL
270 lines
10 KiB
SQL
SELECT uuid_generate_v4();
|
|
|
|
|
|
CREATE TABLE password_reset (
|
|
id SERIAL,
|
|
uid uuid DEFAULT uuid_generate_v4(),
|
|
username VARCHAR(35) NOT NULL ,
|
|
status INT DEFAULT 0,
|
|
added timestamp without time zone DEFAULT now(),
|
|
updated timestamp without time zone DEFAULT now()
|
|
);
|
|
ALTER TABLE ONLY password_reset
|
|
ADD CONSTRAINT password_reset_id_key UNIQUE (id);
|
|
|
|
CREATE TABLE members_pending (
|
|
id SERIAL,
|
|
uid uuid DEFAULT uuid_generate_v4(),
|
|
firstname VARCHAR(35) NOT NULL,
|
|
lastname VARCHAR(35) NOT NULL,
|
|
email VARCHAR(35) NOT NULL ,
|
|
status INT DEFAULT 0,
|
|
added timestamp without time zone DEFAULT now(),
|
|
updated timestamp without time zone DEFAULT now()
|
|
);
|
|
ALTER TABLE ONLY members_pending
|
|
ADD CONSTRAINT members_pending_id_key UNIQUE (id);
|
|
|
|
CREATE TABLE members (
|
|
id SERIAL,
|
|
uid uuid DEFAULT uuid_generate_v4(),
|
|
username VARCHAR(25) UNIQUE NOT NULL,
|
|
password VARCHAR(250) NOT NULL,
|
|
loc INET,
|
|
status INT DEFAULT 0,
|
|
added timestamp without time zone DEFAULT now(),
|
|
updated timestamp without time zone DEFAULT now()
|
|
);
|
|
ALTER TABLE ONLY members
|
|
ADD CONSTRAINT members_id_key UNIQUE (id);
|
|
|
|
ALTER TABLE members ADD email VARCHAR(100);
|
|
ALTER TABLE members ADD account_name VARCHAR(100);
|
|
ALTER TABLE members ADD firstname VARCHAR(25);
|
|
ALTER TABLE members ADD lastname VARCHAR(25);
|
|
ALTER TABLE members ALTER COLUMN password TYPE VARCHAR(250);
|
|
ALTER TABLE members ADD country VARCHAR(3);
|
|
ALTER TABLE members ADD stripe_customer_id VARCHAR(100)
|
|
ALTER TABLE members ADD profile_completed timestamp without time zone DEFAULT NULL;
|
|
|
|
CREATE TABLE members_profile(
|
|
id SERIAL,
|
|
uid uuid DEFAULT uuid_generate_v4(),
|
|
member_id INT REFERENCES members(id) UNIQUE NOT NULL,
|
|
practice VARCHAR(100) NOT NULL,
|
|
specialization VARCHAR(100) NOT NULL,
|
|
introduction TEXT,
|
|
added timestamp without time zone DEFAULT now(),
|
|
updated timestamp without time zone DEFAULT now()
|
|
);
|
|
|
|
ALTER TABLE ONLY members_profile
|
|
ADD CONSTRAINT members_members_profile_id_key UNIQUE (id);
|
|
|
|
ALTER TABLE members_profile OWNER TO merms_panel
|
|
|
|
|
|
CREATE TABLE members_session(
|
|
id SERIAL,
|
|
uid uuid DEFAULT uuid_generate_v4(),
|
|
member_id INT REFERENCES members(id),
|
|
session_id VARCHAR(100) UNIQUE NOT NULL,
|
|
loc INET,
|
|
status INT DEFAULT 0,
|
|
added timestamp without time zone DEFAULT now(),
|
|
updated timestamp without time zone DEFAULT now()
|
|
);
|
|
|
|
ALTER TABLE ONLY members_session
|
|
ADD CONSTRAINT members_session_id_key UNIQUE (id);
|
|
|
|
CREATE TABLE products (
|
|
id SERIAL,
|
|
uid uuid DEFAULT uuid_generate_v4(),
|
|
product_id VARCHAR(25) UNIQUE NOT NULL,
|
|
name VARCHAR(100) UNIQUE NOT NULL,
|
|
description VARCHAR(250) NOT NULL,
|
|
status INT DEFAULT 0,
|
|
|
|
added timestamp without time zone DEFAULT now(),
|
|
updated timestamp without time zone DEFAULT now()
|
|
);
|
|
ALTER TABLE ONLY products
|
|
ADD CONSTRAINT products_id_key UNIQUE (id);
|
|
|
|
INSERT INTO products (name,description,status,product_id, banner) VALUES ('Personal Website','Your personal professional web presence',1,'A000001', 'banner.jpg');
|
|
INSERT INTO products (name,description,status,product_id, banner) VALUES ('Professional Website','Your healthcare practice online presence ',1,'A000002', 'banner.jpg');
|
|
INSERT INTO products (name,description,status,product_id, banner) VALUES ('Personal Blog','Blog to share your health care view',1,'A000003', 'banner.jpg');
|
|
INSERT INTO products (name,description,status,product_id, banner) VALUES ('Professional Blog','Booster your practice with engaging contents',1,'A000004', 'banner.jpg');
|
|
INSERT INTO products (name,description,status,product_id, banner) VALUES ('Practice EMR','Get Open EMR for practice management',1,'A000005', 'banner.jpg');
|
|
|
|
ALTER TABLE products ADD banner VARCHAR(100);
|
|
UPDATE products set banner = 'p'||id||'.jpg'
|
|
|
|
|
|
CREATE TABLE products_details (
|
|
id SERIAL,
|
|
product_id VARCHAR(25) UNIQUE REFERENCES products(product_id),
|
|
details TEXT,
|
|
sale_text TEXT,
|
|
added timestamp without time zone DEFAULT now()
|
|
);
|
|
ALTER TABLE ONLY products_details
|
|
ADD CONSTRAINT products_details_id_key UNIQUE (id);
|
|
|
|
CREATE TABLE member_product_refresh(
|
|
id SERIAL,
|
|
uid uuid DEFAULT uuid_generate_v4(),
|
|
member_id INT REFERENCES members(id),
|
|
product_id VARCHAR(25) NOT NULL,
|
|
subscription_uid VARCHAR(100) NOT NULL,
|
|
status INT DEFAULT 0,
|
|
added timestamp without time zone DEFAULT now(),
|
|
updated timestamp without time zone DEFAULT now()
|
|
);
|
|
|
|
ALTER TABLE ONLY member_product_refresh
|
|
ADD CONSTRAINT member_product_refresh_id_key UNIQUE (id);
|
|
|
|
|
|
CREATE TABLE members_products (
|
|
id SERIAL,
|
|
uid uuid DEFAULT uuid_generate_v4(),
|
|
member_id INT REFERENCES members(id),
|
|
product_id VARCHAR(25) REFERENCES products(product_id),
|
|
internal_url VARCHAR(100) UNIQUE NOT NULL,
|
|
external_url VARCHAR(100),
|
|
dns_group VARCHAR(20),
|
|
status INT DEFAULT 0,
|
|
added timestamp without time zone DEFAULT now(),
|
|
updated timestamp without time zone DEFAULT now()
|
|
);
|
|
ALTER TABLE ONLY members_products
|
|
ADD CONSTRAINT members_products_id_key UNIQUE (id);
|
|
|
|
ALTER TABLE members_products
|
|
ADD CONSTRAINT members_products_unique_member_key
|
|
UNIQUE (member_id, product_id);
|
|
|
|
ALTER TABLE members_products ADD provision_port INT DEFAULT 0;
|
|
ALTER TABLE members_products ADD primary_server VARCHAR(100);
|
|
ALTER TABLE members_products ADD db_status INT DEFAULT 0;
|
|
ALTER TABLE members_products ADD provision_status INT DEFAULT 0;
|
|
ALTER TABLE members_products ADD p_file INT DEFAULT 0;
|
|
ALTER TABLE members_products ADD url_status INT DEFAULT 0;
|
|
|
|
|
|
CREATE TABLE members_products_settings (
|
|
id SERIAL,
|
|
uid uuid DEFAULT uuid_generate_v4(),
|
|
member_id INT REFERENCES members(id),
|
|
subscription_uid VARCHAR(150),
|
|
product_id VARCHAR(25) REFERENCES products(product_id),
|
|
settings_key VARCHAR(100) NOT NULL,
|
|
setting_type VARCHAR(15) NOT NULL,
|
|
setting_value TEXT,
|
|
status INT DEFAULT 0,
|
|
added timestamp without time zone DEFAULT now(),
|
|
updated timestamp without time zone DEFAULT now()
|
|
);
|
|
ALTER TABLE ONLY members_products_settings
|
|
ADD CONSTRAINT members_products_settings_id_key UNIQUE (id);
|
|
|
|
ALTER TABLE members_products_settings
|
|
ADD CONSTRAINT members_products_settings_unique_member_key
|
|
UNIQUE (member_id, product_id, settings_key);
|
|
|
|
|
|
CREATE TABLE provision_plans (
|
|
id SERIAL,
|
|
uid uuid DEFAULT uuid_generate_v4(),
|
|
provision_id INT REFERENCES members_products(id),
|
|
play_file VARCHAR(100)UNIQUE NOT NULL,
|
|
msg VARCHAR(100) ,
|
|
added timestamp without time zone DEFAULT now(),
|
|
updated timestamp without time zone DEFAULT now()
|
|
);
|
|
ALTER TABLE ONLY provision_plans
|
|
ADD CONSTRAINT provision_plans_id_key UNIQUE (id);
|
|
|
|
CREATE TABLE members_external_links (
|
|
id SERIAL,
|
|
uid uuid DEFAULT uuid_generate_v4(),
|
|
member_id INT REFERENCES members(id),
|
|
member_uid VARCHAR(100) NOT NULL,
|
|
facebook VARCHAR(125),
|
|
google VARCHAR(125),
|
|
linkedin VARCHAR(125),
|
|
other_web VARCHAR(125),
|
|
twitter VARCHAR(125),
|
|
added timestamp without time zone DEFAULT now()
|
|
);
|
|
ALTER TABLE ONLY members_external_links
|
|
ADD CONSTRAINT members_external_links_id_key UNIQUE (id);
|
|
|
|
CREATE TABLE provision_actions (
|
|
id SERIAL,
|
|
uid uuid DEFAULT uuid_generate_v4(),
|
|
member_id INT REFERENCES members(id),
|
|
product_uid VARCHAR(100) NOT NULL,
|
|
action VARCHAR(100) NOT NULL,
|
|
added timestamp without time zone DEFAULT now()
|
|
);
|
|
ALTER TABLE ONLY provision_actions
|
|
ADD CONSTRAINT provision_actions_id_key UNIQUE (id);
|
|
|
|
|
|
CREATE TABLE members_actions (
|
|
id SERIAL,
|
|
uid uuid DEFAULT uuid_generate_v4(),
|
|
member_id INT REFERENCES members(id),
|
|
member_uid VARCHAR(100) NOT NULL,
|
|
action_label VARCHAR(35) NOT NULL,
|
|
action_name VARCHAR(100) NOT NULL,
|
|
status_description VARCHAR(25) NOT NULL,
|
|
status INT DEFAULT 0,
|
|
added timestamp without time zone DEFAULT now(),
|
|
updated timestamp without time zone DEFAULT now()
|
|
);
|
|
ALTER TABLE ONLY members_actions
|
|
ADD CONSTRAINT members_actions_id_key UNIQUE (id);
|
|
|
|
|
|
|
|
CREATE TABLE products_actions (
|
|
id SERIAL,
|
|
uid uuid DEFAULT uuid_generate_v4(),
|
|
product_id VARCHAR(25) UNIQUE NOT NULL,
|
|
name VARCHAR(100) UNIQUE NOT NULL,
|
|
description VARCHAR(250) NOT NULL,
|
|
status INT DEFAULT 0,
|
|
|
|
added timestamp without time zone DEFAULT now(),
|
|
updated timestamp without time zone DEFAULT now()
|
|
);
|
|
ALTER TABLE ONLY products_actions
|
|
ADD CONSTRAINT products_actions_id_key UNIQUE (id);
|
|
|
|
|
|
INSERT INTO products_details (product_id,details) VALUES(
|
|
'A000002',
|
|
'
|
|
A Professional Website service utilizing AI tools offers a comprehensive solution for individuals and businesses looking to establish a robust online presence. Here are some key features typically included in such a service:
|
|
|
|
1. **AI-Powered Design**: The service often employs AI algorithms to help create aesthetically pleasing and user-friendly designs. Users can enter their preferences and the tools will generate layout suggestions, color schemes, and typography that best match their brand identity.
|
|
|
|
2. **Content Generation**: With AI-driven content creation tools, users can receive assistance in writing engaging website copy, blog posts, and product descriptions. These tools can analyze successful content in similar industries and generate text that aligns with SEO best practices.
|
|
|
|
3. **SEO Optimization**: AI tools can help optimize websites for search engines by analyzing keywords, providing suggestions for improving visibility, and optimizing site architecture. This ensures that the website ranks well and attracts organic traffic.
|
|
|
|
4. **Chatbots for Customer Engagement**: Implementing AI chatbots allows businesses to provide instant support to visitors. These bots can answer common questions, guide users through the website, and enhance the overall customer experience.
|
|
|
|
5. **Analytics and Insights**: Advanced AI analytics can track user behavior, providing insights into how visitors interact with the site. This data helps businesses make informed decisions on improvements and marketing strategies.
|
|
|
|
6. **Personalization**: Using AI, websites can personalize user experiences based on behavior and preferences. This could include tailored recommendations, customized content, and targeted marketing campaigns that increase engagement.
|
|
|
|
7. **E-commerce Solutions**: For those looking to sell online, AI tools can optimize the shopping experience by providing product recommendations, personalized discounts, and streamlined check-out processes.
|
|
|
|
8. **Maintenance and Support**: Many services offer ongoing support and automatic updates using AI to monitor site performance, ensuring that the website runs smoothly and is protected against threats. By leveraging these AI tools, the Professional Website service can deliver not only visually appealing and functional websites but also enhance user engagement, improve operational efficiency, and drive growth for businesses.
|
|
'
|
|
); |