-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sql
More file actions
106 lines (78 loc) · 2.8 KB
/
Copy pathinit.sql
File metadata and controls
106 lines (78 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
CREATE SCHEMA IF NOT EXISTS log_service;
CREATE TABLE log_service.p_reservation_seat_log
(
id UUID PRIMARY KEY,
reservation_seat_id BIGINT NOT NULL,
seat_number VARCHAR(255) NOT NULL,
action_type VARCHAR(50) NOT NULL,
actor_type VARCHAR(20) NOT NULL,
actor_user_id UUID NULL,
occurred_at TIMESTAMP NOT NULL
);
CREATE TABLE log_service.p_arthall_domain_log
(
id UUID PRIMARY KEY,
domain_type VARCHAR(20) NOT NULL, -- ARTHALL | STAGE
domain_id BIGINT NOT NULL, -- arthall_id 또는 stage_id
action_type VARCHAR(50) NOT NULL, -- ACTIVATED | INACTIVATED | DELETED
actor_type VARCHAR(20) NOT NULL,
actor_user_id UUID NULL,
occurred_at TIMESTAMP NOT NULL
);
CREATE TABLE log_service.p_product_log
(
id UUID NOT NULL,
product_id BIGINT NOT NULL,
action_type VARCHAR(50) NOT NULL, -- CREATED, UPDATED, SUBMITTED_FOR_APPROVAL, APPROVED, REJECTED, RESUBMITTED, SALE_SCHEDULED, SALE_STARTED, SALE_CLOSED, COMPLETED, CANCELLED 등
actor_type VARCHAR(20) NOT NULL,
actor_user_id UUID NULL,
occurred_at TIMESTAMP NOT NULL
);
CREATE TABLE log_service.p_reservation_log
(
id UUID NOT NULL,
reservation_id UUID NOT NULL,
reservation_number VARCHAR(255) NULL,
action_type VARCHAR(50) NOT NULL,
actor_type VARCHAR(20) NOT NULL,
actor_user_id UUID NULL,
occurred_at TIMESTAMP NOT NULL
);
CREATE TABLE log_service.p_ticket_log
(
id UUID NOT NULL,
ticket_id UUID NOT NULL,
receive_method VARCHAR(255) NULL,
action_type VARCHAR(50) NOT NULL,
actor_type VARCHAR(20) NOT NULL,
actor_user_id UUID NULL,
occurred_at TIMESTAMP NOT NULL
);
CREATE TABLE log_service.p_payment_log
(
id UUID NOT NULL,
payment_id UUID NOT NULL,
method VARCHAR(255) NULL,
retry_count INT NOT NULL DEFAULT 0,
action_type VARCHAR(50) NOT NULL,
actor_type VARCHAR(20) NOT NULL,
actor_user_id UUID NULL,
occurred_at TIMESTAMP NOT NULL
);
CREATE TABLE log_service.p_user_log
(
id UUID NOT NULL,
user_id UUID NOT NULL,
action_type VARCHAR(50) NOT NULL,
actor_type VARCHAR(20) NOT NULL,
actor_user_id UUID NULL,
occurred_at TIMESTAMP NOT NULL
);
CREATE TABLE log_service.p_auth_log
(
id UUID NOT NULL,
action_type VARCHAR(50) NOT NULL,
actor_type VARCHAR(20) NOT NULL,
actor_user_id UUID NOT NULL, -- auth_id
occurred_at TIMESTAMP NOT NULL
);