Implement API security baseline (sys_user, JWT, audit fields, transactions, unique constraints) and Web real login with 401 handling. Document setup and development workflows in root, WmsLite.Api, and WmsLite.Web README files. Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
715 B
SQL
18 lines
715 B
SQL
-- 增量:HTTP 访问日志表(与 Models/HttpAccessLog 一致)
|
|
CREATE TABLE IF NOT EXISTS http_access_log (
|
|
id BIGINT NOT NULL PRIMARY KEY,
|
|
trace_id VARCHAR(64) NOT NULL,
|
|
http_method VARCHAR(16) NOT NULL,
|
|
path VARCHAR(512) NOT NULL,
|
|
query_string TEXT NULL,
|
|
status_code INTEGER NOT NULL,
|
|
request_body TEXT NULL,
|
|
response_body TEXT NULL,
|
|
duration_ms INTEGER NULL,
|
|
client_ip VARCHAR(64) NULL,
|
|
user_id VARCHAR(128) NULL,
|
|
create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
CREATE INDEX IF NOT EXISTS ix_http_access_log_create_time ON http_access_log (create_time DESC);
|
|
CREATE INDEX IF NOT EXISTS ix_http_access_log_trace_id ON http_access_log (trace_id);
|