Skip to content

Commit 7834196

Browse files
committed
[FEAT] Clothes 엔티티 추가
1 parent b94c129 commit 7834196

1 file changed

Lines changed: 96 additions & 0 deletions

File tree

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
package fitfit.domain.clothes.entity;
2+
3+
import fitfit.domain.category.entity.Category;
4+
import fitfit.domain.member.entity.Member;
5+
import fitfit.global.entity.BaseEntity;
6+
import fitfit.global.enums.Style;
7+
import jakarta.persistence.*;
8+
import lombok.*;
9+
10+
import java.time.LocalDate;
11+
import java.time.LocalDateTime;
12+
13+
@Getter
14+
@NoArgsConstructor(access = AccessLevel.PROTECTED)
15+
@AllArgsConstructor
16+
@Builder
17+
@Entity
18+
@Table(name = "CLOTHES")
19+
public class Clothes extends BaseEntity {
20+
21+
@Id
22+
@GeneratedValue(strategy = GenerationType.IDENTITY)
23+
@Column(name = "clothes_id")
24+
private Long id;
25+
26+
@ManyToOne(fetch = FetchType.LAZY)
27+
@JoinColumn(name = "seller_id", nullable = false)
28+
private Member seller;
29+
30+
@ManyToOne(fetch = FetchType.LAZY)
31+
@JoinColumn(name = "category_id", nullable = false)
32+
private Category category;
33+
34+
@Column(length = 25, nullable = false)
35+
private String title;
36+
37+
@Column(nullable = false)
38+
private Long price;
39+
40+
@Column(length = 255)
41+
private String image; // 옷 사진
42+
43+
@Enumerated(EnumType.STRING)
44+
@Column
45+
private Style style;
46+
47+
@Column(length = 255)
48+
private String comment;
49+
50+
@Column(name = "sale_agreed")
51+
private Boolean saleAgreed; // n개월 이후 특가 세일 동의여부
52+
53+
@Column(name = "meetup_agreed")
54+
private Boolean meetupAgreed; // 직거래여부
55+
56+
@Column(length = 25, nullable = false)
57+
private String address;
58+
59+
@Column(name = "is_sold")
60+
private Boolean isSold; // 판매여부
61+
62+
@Column(name = "sold_date")
63+
private LocalDateTime soldDate; // 판매날짜
64+
65+
@Column(name = "see_count", nullable = false)
66+
@Builder.Default
67+
private Long seeCount = 0L; // 조회수
68+
69+
@Column(name = "offer_agreed")
70+
private Boolean offerAgreed; // 가격 제안 받기 여부
71+
72+
@Column(name = "total_length", length = 25)
73+
private String totalLength; // 총장
74+
75+
@Column(name = "chest_width", length = 25)
76+
private String chestWidth; // 가슴단면
77+
78+
@Column(name = "shoulder_width", length = 25)
79+
private String shoulderWidth; // 어깨너비
80+
81+
@Column(name = "foot_size", length = 25)
82+
private String footSize; // 발사이즈
83+
84+
@Column(name = "waist_measurement", length = 25)
85+
private String waistMeasurement; // 허리 단면
86+
87+
@Column(name = "thigh_measurement", length = 25)
88+
private String thighMeasurement; // 허벅지 단면
89+
90+
@Column(name = "sales_period")
91+
private LocalDate salesPeriod; // 판매 기간
92+
93+
@Column(name = "discount_rate")
94+
private Long discountRate; // 할인율
95+
96+
}

0 commit comments

Comments
 (0)