瀏覽代碼

jdk 模块的添加 jdk.model 包用于存放各种数据模型

reghao 4 月之前
父節點
當前提交
8c53f5eb3b

+ 48 - 0
jdk/src/main/java/cn/reghao/jutil/jdk/model/jwt/JwtPayload.java

@@ -0,0 +1,48 @@
+package cn.reghao.jutil.jdk.model.jwt;
+
+/**
+ * @author reghao
+ * @date 2021-07-26 09:58:45
+ */
+public class JwtPayload {
+    private final Integer loginType;
+    private final Integer plat;
+    private final String userId;
+    private final String roles;
+    // 在何时过期
+    private final Long expireAt;
+    private final String signKey;
+
+    public JwtPayload(Integer loginType, Integer plat, String userId, String roles, long expireAt, String signKey) {
+        this.loginType = loginType;
+        this.plat = plat;
+        this.userId = userId;
+        this.roles = roles;
+        this.expireAt = expireAt;
+        this.signKey = signKey;
+    }
+
+    public Integer getLoginType() {
+        return loginType;
+    }
+
+    public Integer getPlat() {
+        return plat;
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public String getRoles() {
+        return roles;
+    }
+
+    public Long getExpireAt() {
+        return expireAt;
+    }
+
+    public String getSignKey() {
+        return signKey;
+    }
+}

+ 36 - 0
jdk/src/main/java/cn/reghao/jutil/jdk/model/jwt/OssPayload.java

@@ -0,0 +1,36 @@
+package cn.reghao.jutil.jdk.model.jwt;
+
+import java.io.Serializable;
+
+/**
+ * @author reghao
+ * @date 2023-08-23 10:26:01
+ */
+public class OssPayload implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    private int channelCode;
+    private String action;
+    private int userId;
+
+    public OssPayload() {
+    }
+
+    public OssPayload(int channelCode, String action, int userId) {
+        this.channelCode = channelCode;
+        this.action = action;
+        this.userId = userId;
+    }
+
+    public String getAction() {
+        return action;
+    }
+
+    public int getChannelCode() {
+        return channelCode;
+    }
+
+    public int getUserId() {
+        return userId;
+    }
+}