You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xian/UserAttractions

48 lines
1.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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;}
}