Skip to content

Commit

Permalink
Feat: user 관련 엔티티 생성 #1
Browse files Browse the repository at this point in the history
  • Loading branch information
tokyj515 committed Jul 13, 2023
1 parent 89ec9b6 commit e3a2dac
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/main/java/com/example/neoul/entity/user/UserLikedBrand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.example.neoul.entity.user;

import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

@DynamicInsert
@DynamicUpdate
@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "user_liked_product")
@Entity
public class UserLikedBrand {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;

@Column(name = "user_id")
private Long userId;

@Column(name = "brand_id")
private Long brandId;
}
29 changes: 29 additions & 0 deletions src/main/java/com/example/neoul/entity/user/UserLikedProduct.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.example.neoul.entity.user;

import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

@DynamicInsert
@DynamicUpdate
@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "user_liked_product")
@Entity
public class UserLikedProduct {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;

@Column(name = "user_id")
private Long userId;

@Column(name = "product_id")
private Long productId;
}
29 changes: 29 additions & 0 deletions src/main/java/com/example/neoul/entity/user/UserSearchWord.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.example.neoul.entity.user;

import com.example.neoul.global.entity.BaseEntity;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

@DynamicInsert
@DynamicUpdate
@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "user_liked_product")
@Entity
public class UserSearchWord extends BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;

@Column(name = "user_id")
private Long userId;

private String word;
}

0 comments on commit e3a2dac

Please sign in to comment.