-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from Orange-Co/feature/home
Feat: reflect modification
- Loading branch information
Showing
26 changed files
with
328 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/co/orange/ddanzi/domain/product/DefaultDiscount.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package co.orange.ddanzi.domain.product; | ||
|
||
import co.orange.ddanzi.global.common.domain.BaseTimeEntity; | ||
import jakarta.persistence.*; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.annotations.ColumnDefault; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
@Table(name = "defalut_discounts") | ||
@Entity | ||
public class DefaultDiscount extends BaseTimeEntity { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "defalut_discount_id") | ||
private Long id; //할인율 고유 ID | ||
|
||
@ColumnDefault("0.3") | ||
@Column(name = "rate", nullable = false) | ||
private Float rate; //할인율, 디폴트 30% | ||
|
||
// @OneToOne(fetch = FetchType.LAZY) | ||
// @JoinColumn(name = "root_category_id", nullable = true) | ||
// private Category rootCategory; //카테고리 = root category | ||
|
||
@Builder | ||
public DefaultDiscount(Long id, Float rate) { | ||
this.id = id; | ||
this.rate = rate; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package co.orange.ddanzi.domain.user; | ||
|
||
import co.orange.ddanzi.domain.user.enums.DeviceType; | ||
import jakarta.persistence.*; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor | ||
@Table(name = "device") | ||
@Entity | ||
public class Device { | ||
@Id | ||
@Column(name = "device_token") | ||
private String deviceToken; | ||
|
||
@Column(name = "type") | ||
private DeviceType type; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "user_id") | ||
private User user; | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/co/orange/ddanzi/domain/user/enums/DeviceType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package co.orange.ddanzi.domain.user.enums; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
public enum DeviceType { | ||
ANDROID("ANDROID"), | ||
IOS("IOS") | ||
; | ||
|
||
private final String deviceToken; | ||
DeviceType(String deviceToken) { | ||
this.deviceToken = deviceToken; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.