From 9f8395fab13ca4b230a0f7d62636e209745c91d4 Mon Sep 17 00:00:00 2001
From: lrj <owen.stl@gmail.com>
Date: 星期日, 28 九月 2025 14:16:18 +0800
Subject: [PATCH] feat: 完善注册流程的文件上传功能

---
 backend/src/main/java/com/rongyichuang/user/entity/User.java |   50 +++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 41 insertions(+), 9 deletions(-)

diff --git a/backend/src/main/java/com/rongyichuang/user/entity/User.java b/backend/src/main/java/com/rongyichuang/user/entity/User.java
index 0cbe8e6..15479f5 100644
--- a/backend/src/main/java/com/rongyichuang/user/entity/User.java
+++ b/backend/src/main/java/com/rongyichuang/user/entity/User.java
@@ -2,18 +2,22 @@
 
 import com.rongyichuang.common.entity.BaseEntity;
 import jakarta.persistence.*;
+import org.hibernate.annotations.Where;
+
+import java.time.LocalDate;
 
 /**
  * 鐢ㄦ埛瀹炰綋绫�
  */
 @Entity
 @Table(name = "t_user")
+@Where(clause = "state = 1")
 public class User extends BaseEntity {
 
     /**
      * 鐢ㄦ埛濮撳悕
      */
-    @Column(name = "name", length = 64)
+    @Column(name = "name", length = 255, nullable = false)
     private String name;
 
     /**
@@ -25,38 +29,50 @@
     /**
      * 鎵嬫満鍙风爜
      */
-    @Column(name = "phone", length = 32)
+    @Column(name = "phone", length = 20)
     private String phone;
 
     /**
-     * 瀵嗙爜
+     * 鐢熸棩
      */
-    @Column(name = "password", length = 128)
-    private String password;
+    @Column(name = "birthday")
+    private LocalDate birthday;
 
     /**
      * 寰俊openid
      */
-    @Column(name = "wx_openid", length = 64)
+    @Column(name = "wx_openid", length = 50)
     private String wxOpenid;
 
     /**
      * 寰俊unionid
      */
-    @Column(name = "wx_unionid", length = 64)
+    @Column(name = "wx_unionid", length = 50)
     private String wxUnionid;
 
     /**
      * 寰俊鍏紬鍙穙penid
      */
-    @Column(name = "wx_oa_openid", length = 64)
+    @Column(name = "wx_oa_openid", length = 50)
     private String wxOaOpenid;
+
+    /**
+     * 瀵嗙爜
+     */
+    @Column(name = "password", length = 255)
+    private String password;
 
     /**
      * 鎵嬫満鍙风爜锛堝鐢ㄥ瓧娈碉級
      */
-    @Column(name = "mobile", length = 32)
+    @Column(name = "mobile", length = 20)
     private String mobile;
+
+    /**
+     * 鐘舵�侊細1-姝e父锛�0-鍒犻櫎
+     */
+    @Column(name = "state", nullable = false)
+    private Integer state = 1;
 
     // 鏋勯�犲嚱鏁�
     public User() {}
@@ -90,6 +106,14 @@
 
     public void setPhone(String phone) {
         this.phone = phone;
+    }
+
+    public LocalDate getBirthday() {
+        return birthday;
+    }
+
+    public void setBirthday(LocalDate birthday) {
+        this.birthday = birthday;
     }
 
     public String getPassword() {
@@ -131,4 +155,12 @@
     public void setMobile(String mobile) {
         this.mobile = mobile;
     }
+
+    public Integer getState() {
+        return state;
+    }
+
+    public void setState(Integer state) {
+        this.state = state;
+    }
 }
\ No newline at end of file

--
Gitblit v1.8.0