From 5b04d19edea32888efa9ee4881395a21da348e3f Mon Sep 17 00:00:00 2001
From: 安瑾然 <107107765@qq.com>
Date: 星期四, 14 七月 2022 14:21:44 +0800
Subject: [PATCH] commit

---
 src/main/java/com/example/jz/modle/entity/Message.java |   66 ++++++++++++--------------------
 1 files changed, 25 insertions(+), 41 deletions(-)

diff --git a/src/main/java/com/example/jz/modle/entity/Message.java b/src/main/java/com/example/jz/modle/entity/Message.java
index fc311c4..777316b 100644
--- a/src/main/java/com/example/jz/modle/entity/Message.java
+++ b/src/main/java/com/example/jz/modle/entity/Message.java
@@ -1,5 +1,14 @@
 package com.example.jz.modle.entity;
 
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
 import java.io.Serializable;
 import java.util.Date;
 
@@ -9,7 +18,13 @@
  * @author makejava
  * @since 2022-07-12 16:50:59
  */
-public class Message implements Serializable {
+@TableName("qyjz.message")
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+public class Message  extends Model<Message> implements Serializable {
     private static final long serialVersionUID = -28737108473853898L;
     /**
      * 娑堟伅鍐呭
@@ -26,50 +41,19 @@
     /**
      * 娑堟伅id
      */
+    @TableId
     private Integer id;
     
     private Date ctime;
 
-
-    public String getText() {
-        return text;
+    /**
+     * 鑾峰彇涓婚敭鍊�
+     *
+     * @return 涓婚敭鍊�
+     */
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
     }
-
-    public void setText(String text) {
-        this.text = text;
-    }
-
-    public Integer getUserId() {
-        return userId;
-    }
-
-    public void setUserId(Integer userId) {
-        this.userId = userId;
-    }
-
-    public Integer getGroupId() {
-        return groupId;
-    }
-
-    public void setGroupId(Integer groupId) {
-        this.groupId = groupId;
-    }
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public Date getCtime() {
-        return ctime;
-    }
-
-    public void setCtime(Date ctime) {
-        this.ctime = ctime;
-    }
-
 }
 

--
Gitblit v1.8.0