Contact Files
This commit is contained in:
@@ -1388,3 +1388,61 @@ CREATE TABLE signup (
|
|||||||
ALTER TABLE ONLY signup
|
ALTER TABLE ONLY signup
|
||||||
ADD CONSTRAINT signup_id_key UNIQUE (id);
|
ADD CONSTRAINT signup_id_key UNIQUE (id);
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE products_contacts (
|
||||||
|
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,
|
||||||
|
title VARCHAR(100),
|
||||||
|
email VARCHAR(100),
|
||||||
|
sender VARCHAR(100),
|
||||||
|
message TEXT,
|
||||||
|
status INT DEFAULT 0,
|
||||||
|
added timestamp without time zone DEFAULT now(),
|
||||||
|
updated timestamp without time zone DEFAULT now()
|
||||||
|
);
|
||||||
|
ALTER TABLE ONLY products_contacts
|
||||||
|
ADD CONSTRAINT products_contacts_id_key UNIQUE (id);
|
||||||
|
|
||||||
|
|
||||||
|
logger.info(f"Process_save_contacts IN -> : {data}", exc_info=True)
|
||||||
|
message = data.get('message', '')
|
||||||
|
subscription_uid = data.get('subscription_uid', '')
|
||||||
|
title = data.get('title', '')
|
||||||
|
email = data.get('email', '')
|
||||||
|
sender = data.get('sender', '')
|
||||||
|
memSubb = MembersProducts.get_member_product_by_subscription_uid(subscription_uid)
|
||||||
|
if memSubb:
|
||||||
|
member_id = memSubb.member_id,
|
||||||
|
product_id = memSubb.product_id
|
||||||
|
if message != '' and title != '' and email != '' and sender != '':
|
||||||
|
logger.info(f"Ready to save data: {data}", exc_info=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
merms_panel=> \d products_colorstyle
|
||||||
|
Table "public.products_colorstyle"
|
||||||
|
Column | Type | Collation | Nullable | Default
|
||||||
|
-------------+-----------------------------+-----------+----------+-------------------------------------------------
|
||||||
|
id | integer | | not null | nextval('products_colorstyle_id_seq'::regclass)
|
||||||
|
uid | uuid | | | uuid_generate_v4()
|
||||||
|
product_id | character varying(25) | | |
|
||||||
|
name | character varying(55) | | not null |
|
||||||
|
color_style | character varying(55) | | not null |
|
||||||
|
color_code | character varying(9) | | not null |
|
||||||
|
status | integer | | | 0
|
||||||
|
added | timestamp without time zone | | | now()
|
||||||
|
Indexes:
|
||||||
|
"products_colorstyle_id_key" UNIQUE CONSTRAINT, btree (id)
|
||||||
|
Foreign-key constraints:
|
||||||
|
"products_colorstyle_product_id_fkey" FOREIGN KEY (product_id) REFERENCES products(product_id)
|
||||||
|
|
||||||
|
merms_panel=>
|
||||||
|
merms_panel=>
|
||||||
|
merms_panel=>
|
||||||
|
merms_panel=>
|
||||||
|
merms_panel=>
|
||||||
|
merms_panel=>
|
||||||
@@ -74,8 +74,7 @@ class ContactService(BaseService):
|
|||||||
db.session.rollback()
|
db.session.rollback()
|
||||||
return ResponseHelper.internal_server_error()
|
return ResponseHelper.internal_server_error()
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
|
||||||
def dummy_message():
|
def dummy_message():
|
||||||
dmm = "Dmummy Message" + str(random.randint(100, 400))
|
dmm = "Dmummy Message" + str(random.randint(100, 400))
|
||||||
mss = f"""
|
mss = f"""
|
||||||
|
|||||||
Reference in New Issue
Block a user