Skip to content

Commit bd1a567

Browse files
committed
feat: 사용자 행동 상태 로깅
1 parent 92665a2 commit bd1a567

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.loopers.domain.actionlog;
2+
3+
public enum ActionType {
4+
PRODUCT_LOOKUP,
5+
DO_LIKE,
6+
CREATE_ORDER
7+
}

apps/commerce-api/src/main/java/com/loopers/domain/actionlog/UserActionLog.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,16 @@ public class UserActionLog extends BaseEntity {
2424
@Column(name = "product_id", nullable = false)
2525
private Long productId;
2626

27-
public UserActionLog(Long productId) {
27+
@Enumerated(EnumType.STRING)
28+
@Column(name = "action_type", nullable = false)
29+
private ActionType actionType;
30+
31+
public UserActionLog(Long productId, ActionType actionType) {
2832
this.productId = productId;
33+
this.actionType = actionType;
2934
}
3035

3136
public static UserActionLog create(ProductLookedUpEvent event) {
32-
return new UserActionLog(event.productId());
37+
return new UserActionLog(event.productId(), event.actionType());
3338
}
3439
}

0 commit comments

Comments
 (0)