ソースを参照

feat: +add user group

Chen YZ 5 年 前
コミット
da7e237da1

+ 50 - 0
web/src/main/java/seecoder/devcloud/web/po/user/Group.java

@@ -0,0 +1,50 @@
+package seecoder.devcloud.web.po.user;
+
+
+import lombok.Builder;
+import lombok.Data;
+import seecoder.devcloud.web.enums.GroupType;
+
+import java.util.List;
+
+/**
+ * Description:
+ * 小组的实体类
+ *
+ * @author xxz
+ * Created on 10/26/2018
+ */
+@Data
+@Builder
+public class Group {
+
+    /**
+     * id并非由此后端生成,而是gitlab创建后,将gitlab groupid填入
+     */
+    private Integer id;
+
+    /**
+     * 来源于gitlab
+     */
+    private Integer namespace;
+    /**
+     * 小组类型
+     */
+    private GroupType type;
+
+    /**
+     * 小组的加组链接
+     */
+    private String shareLink;
+
+    /**
+     * 组名
+     */
+    private String name;
+
+    /**
+     * 小组成员
+     */
+    private List<User> members;
+
+}

+ 53 - 0
web/src/main/java/seecoder/devcloud/web/po/user/User.java

@@ -0,0 +1,53 @@
+package seecoder.devcloud.web.po.user;
+
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.type.Alias;
+import org.hibernate.annotations.LazyCollection;
+import org.hibernate.annotations.LazyCollectionOption;
+import org.springframework.data.annotation.CreatedDate;
+import org.springframework.data.jpa.domain.support.AuditingEntityListener;
+import seecoder.devcloud.web.enums.UserIdentity;
+
+import javax.persistence.*;
+import java.sql.Timestamp;
+import java.time.LocalDateTime;
+import java.util.HashSet;
+import java.util.Set;
+
+@Data
+public class User {
+
+   /**
+    * 注意用户id并非由此后端数据库生成,而是gitlab创建后填入,以确保两者的关联性的正确
+    */
+   private Integer id;
+
+   private String username;
+
+   private String nickname="";
+
+   private String password;
+
+   private String phone;
+
+   private String email;
+
+   private UserIdentity role;
+
+   private Timestamp createdAt;
+
+   /**
+    * 这个属性来自于gitlab
+    */
+   private Integer namespace;
+
+   /**
+    * 这个属性来自于gitlab
+    */
+   private String token;
+}