| 15:06:06.708 | 5.2 ms | SELECT | SELECT
d.nspname AS table_schema,
c.relname AS table_name,
a.attname AS column_name,
t.typname AS data_type,
a.attlen AS character_maximum_length,
pg_catalog.col_description(c.oid, a.attnum) AS column_comment,
a.atttypmod AS modifier,
a.attnotnull = false AS is_nullable,
CAST(pg_get_expr(ad.adbin, ad.adrelid) AS varchar) AS column_default,
coalesce(pg_get_expr(ad.adbin, ad.adrelid) ~ 'nextval',false) AS is_autoinc,
array_to_string((select array_agg(enumlabel) from pg_enum where enumtypid=a.atttypid)::varchar[],',') as enum_values,
CASE atttypid
WHEN 21 /*int2*/ THEN 16
WHEN 23 /*int4*/ THEN 32
WHEN 20 /*int8*/ THEN 64
WHEN 1700 /*numeric*/ THEN
CASE WHEN atttypmod = -1
THEN null
ELSE ((atttypmod - 4) >> 16) & 65535
END
WHEN 700 /*float4*/ THEN 24 /*FLT_MANT_DIG*/
WHEN 701 /*float8*/ THEN 53 /*DBL_MANT_DIG*/
ELSE null
END AS numeric_precision,
CASE
WHEN atttypid IN (21, 23, 20) THEN 0
WHEN atttypid IN (1700) THEN
CASE
WHEN atttypmod = -1 THEN null
ELSE (atttypmod - 4) & 65535
END
ELSE null
END AS numeric_scale,
CAST(
information_schema._pg_char_max_length(information_schema._pg_truetypid(a, t), information_schema._pg_truetypmod(a, t))
AS numeric
) AS size,
a.attnum = any (ct.conkey) as is_pkey
FROM
pg_class c
LEFT JOIN pg_attribute a ON a.attrelid = c.oid
LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_namespace d ON d.oid = c.relnamespace
LEFT join pg_constraint ct on ct.conrelid=c.oid and ct.contype='p'
WHERE
a.attnum > 0 and t.typname != ''
and c.relname = 'tbl_pre_sales'
and d.nspname = 'a57be577deb434'
ORDER BY
a.attnum; |
| 15:06:06.854 | 1.5 ms | INSERT | INSERT INTO "global"."tbl_api_log" ("code", "schema", "user_id", "device_type", "version_code", "url", "request", "response", "php_error", "time", "duration") VALUES (200, 'a57be577deb434', 1000, 2, 1159, 'v2/pre-sales/list', '{"access_token":"R8ScrIY1ab3sgHgv8KlMKFukwMtD6QYC","device_type":"2","id":"9262","posttime":"1781766400","token":"81d06fe549f67cf9fb3f2a5a3c1f46e1","version_code":"1159"}', '{"code":200,"data":{"list":[{"id":1946,"client_id":3464,"start_at":"2026-06-02 00:00:00","description":"","client_concerns":"","pre_sales_assessment":"","engineer_id":5064,"created_by":5064,"created_at":"2026-06-02 18:10:00","updated_at":"2026-06-02 18:10:00","following_work_content":"","project_status":null,"end_at":"2026-06-02 02:00:00","has_following_work":false,"location_id":null,"is_draft":0,"case_id":9262,"service_id":273,"location_in_id":null,"location_out_id":null,"ticket_no":"PS260602001001","client_document_id":null,"client_document_file":null,"indistance":999999999,"outdistance":999999999,"hours_spent":"02:00:00","client":{"id":3464,"key":3464,"name":"\u9690\u6027\u9700\u6c42","logo":null,"sales_rep":null,"salesRep":null},"case":{"id":9262,"case_status":3,"client_id":3464,"project_id":4176,"client":{"id":3464,"key":3464,"name":"\u9690\u6027\u9700\u6c42"},"project":{"id":4176,"key":4176,"name":"\u9500\u552e\u7ebf\u7d22\u751f\u621020260602003"}},"salesRep":null,"engineer":{"id":5064,"key":5064,"name":"\u59da\u96ea\u7eaf","sex":"F","avatar":{"id":38,"user_id":5064,"name":"\/files\/cdn\/a57be577deb434\/avatar\/5bec09dc-1f7a-3542-89a2-cedfefb3fded.png"}},"createdBy":{"id":5064,"key":5064,"name":"\u59da\u96ea\u7eaf","sex":"F","department_id":10,"avatar":{"id":38,"user_id":5064,"name":"\/files\/cdn\/a57be577deb434\/avatar\/5bec09dc-1f7a-3542-89a2-cedfefb3fded.png"},"department":{"id":10,"key":10,"name":"\u8f6f\u4ef6\u5f00\u53d1"}},"location":null,"locationIn":null,"locationOut":null,"preSalesProductTypes":[],"attendedContacts":[{"id":6258,"key":6258,"name":"12"}],"attachmentRelationships":[],"files":[],"service":{"id":273,"serial_no":"FA01","title":"\u6280\u672f\u65b9\u6848-\u4e00\u7ea7\u6587\u6863","brand_id":33,"type_id":9,"points":150,"points_off_time":150,"points_holiday":150,"description":"\u6280\u672f\u65b9\u6848-\u6587\u6863","created_by":1013,"created_at":"2021-05-31 07:39:33","updated_at":"2026-04-23 16:32:29","is_delete":false,"sort":3,"is_stop":false,"brand":{"id":33,"key":33,"name":"Toast"},"type":{"id":9,"key":9,"name":"\u6280\u672f\u57f9\u8bad"}},"clientDocument":null,"commentCount":null,"unreadComments":null,"reimbursementCount":null,"reimbursements":[],"hours_spent_display":"2\u5c0f\u65f6","can_update":true,"can_delete":true,"can_complete":false,"can_create_reimbursement":false,"unread":0,"bgcolor":"#89c541","can_location_in":false,"can_location_out":false}],"pagenation":{"totalcount":1,"thispage":1,"pagesize":10},"can_create":false},"status":1,"msg":[{"name":"success","success":"\u6210\u529f\u83b7\u53d6\u6570\u636e","error":""}],"ip":"223.104.40.234","ua":"jinchangxiao\/2.3.156 (iPhone 12; iOS 26.5; Scale\/3.00)"}', FALSE, '2026-06-18 15:06:06', 206106112) RETURNING "id" |