File size: 582 Bytes
4aed8ef
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
CREATE TABLE IF NOT EXISTS FRAUD_DETAILS (
    id SERIAL PRIMARY KEY,
    fk_transaction_id INT NOT NULL,
    FOREIGN KEY (fk_transaction_id) REFERENCES TRANSACTIONS(id),
    fraud_score DECIMAL(5, 2) NOT NULL,
    model_version VARCHAR(50) NOT NULL,
    notification_sent BOOLEAN NOT NULL DEFAULT FALSE,
    notification_recipients VARCHAR,
    notification_datetime TIMESTAMP,
);

CREATE INDEX idx_fraud_score ON FRAUD_DETAILS (fraud_score);
CREATE INDEX idx_model_version ON FRAUD_DETAILS (model_version);
CREATE INDEX idx_notification_sent ON FRAUD_DETAILS (notification_sent);