File tree Expand file tree Collapse file tree
apps/commerce-api/src/main/java/com/loopers/domain/actionlog Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package com .loopers .domain .actionlog ;
2+
3+ public enum ActionType {
4+ PRODUCT_LOOKUP ,
5+ DO_LIKE ,
6+ CREATE_ORDER
7+ }
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments