This commit is contained in:
王子琦
2026-01-13 13:55:40 +08:00
parent 6affd0c77e
commit f58e05d962
72 changed files with 3251 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
package com.flower.review;
import lombok.Data;
import javax.persistence.*;
import java.time.LocalDateTime;
@Data
@Entity
@Table(name = "reviews")
public class Review {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private Long orderId;
private Long productId;
private Long userId;
private Integer rating;
@Column(length = 1000)
private String content;
@Column(length = 1000)
private String images;
@Column(length = 16)
private String status = "PENDING";
private LocalDateTime createdAt;
@PrePersist
public void onCreate() {
if (createdAt == null) {
createdAt = LocalDateTime.now();
}
}
}