forked from python-jsonschema/jsonschema
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRepoSourceConfigEntity.java
More file actions
74 lines (62 loc) · 1.96 KB
/
Copy pathRepoSourceConfigEntity.java
File metadata and controls
74 lines (62 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package com.softsafe.sast.platform.domain.user.model.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.softsafe.sast.platform.domain.model.DeleteBaseEntity;
import com.softsafe.sast.platform.domain.model.enums.OauthSource;
import lombok.*;
import java.io.Serializable;
import java.util.Map;
/**
* 代码仓库集成配置实体类
* 对应表: repo_source_config
*/
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
// autoResultMap = true 是核心,必须开启才能让 @TableField 的 TypeHandler 生效,自动转换 JSONB
@TableName(value = "repo_source_config", autoResultMap = true)
public class RepoSourceConfigEntity extends DeleteBaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
* Postgres 的 GENERATED BY DEFAULT AS IDENTITY 对应 IdType.AUTO
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 配置名称(如: 公司GitHub, 私有GitLab)
*/
private String name;
/**
* 类型: GITHUB, GITLAB, GITLAB_SELF_HOSTED
* 建议项目中定义对应的枚举类 RepoSourceTypeEnum
*/
private OauthSource type;
/**
* API地址
*/
private String endpoint;
/**
* 页面访问地址
*/
private String uiUrl;
/**
* Client ID / App ID
*/
private String clientId;
/**
* Client Secret (建议应用层加密后存入)
*/
private String clientSecret;
/**
* 扩展参数 (JSONB)
*/
@TableField(typeHandler = JacksonTypeHandler.class)
private Map<String, Object> extendedParams;
private Integer status;
}