blob: 7a3dcda97ee4da51efe4b708c8b2be82157368ed [file] [log] [blame]
223011385e9c35a2025-06-04 15:52:45 +08001package com.example.myproject.entity;
2
3import javax.persistence.*;
4
5@Entity
6@Table(name = "likes")
7public class Likes {
8
9 @Id
10 @GeneratedValue(strategy = GenerationType.IDENTITY) // 使用自增主键
11 @Column(name = "likeId")
12 private Long likeId;
13
14 @Column(name = "user_id")
15 private Long userId;
16
17 @Column(name = "postNo")
18 private Long postNo;
19
20 // Getters and Setters
21 public Long getLikeId() {
22 return likeId;
23 }
24
25 public void setLikeId(Long likeId) {
26 this.likeId = likeId;
27 }
28
29 public Long getUserId() {
30 return userId;
31 }
32
33 public void setUserId(Long userId) {
34 this.userId = userId;
35 }
36
37 public Long getPostNo() {
38 return postNo;
39 }
40
41 public void setPostNo(Long postNo) {
42 this.postNo = postNo;
43 }
44}