From 61094539d3041ce6901ff227002f2c41a4f3707e Mon Sep 17 00:00:00 2001 From: p96aetpbr <2691443110@qq.com> Date: Wed, 26 Jun 2024 08:19:09 +0800 Subject: [PATCH] Add UserAttractions --- UserAttractions | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 UserAttractions diff --git a/UserAttractions b/UserAttractions new file mode 100644 index 0000000..c0821df --- /dev/null +++ b/UserAttractions @@ -0,0 +1,47 @@ +package com.power.travel.model; + + +import javax.persistence.*; +import java.util.Date; +//定义了一个名为UserAttractions的Java实体类,用于表示用户对旅游景点的评价或信息 +@Entity //标记该类为一个JPA实体 +@Table(name = "user_attractions") +public class UserAttractions { + @Id + @Column(name = "id") + private String id; + + @OneToOne + @JoinColumn(name = "user_id") + private User user; + + @OneToOne + @JoinColumn(name = "attractions_id") + private Attractions attractions; + + @Column(name = "userAttractionsDescribe") + private String describe; + + @Column(name = "createDate") + private Date createDate; + + public String getId() { return id; } + + public void setId(String id) { this.id = id; } + + public User getUser() { return user; } + + public void setUser(User user) { this.user = user; } + + public Attractions getAttractions() { return attractions; } + + public void setAttractions(Attractions attractions) { this.attractions = attractions; } + + public String getDescribe() { return describe; } + + public void setDescribe(String describe) { this.describe = describe; } + + public Date getCreateDate() { return createDate; } + + public void setCreateDate(Date createDate) { this.createDate = createDate;} +}