This commit is contained in:
jack ning
2025-02-11 17:14:57 +08:00
parent b69d173df3
commit c3e7d4e7c9
35 changed files with 532 additions and 266 deletions

View File

@@ -13,12 +13,8 @@
*/
package com.bytedesk.core.action;
import org.hibernate.annotations.JdbcTypeCode;
import org.hibernate.type.SqlTypes;
import com.bytedesk.core.base.BaseEntity;
import com.bytedesk.core.constant.BytedeskConsts;
import com.bytedesk.core.constant.TypeConsts;
import com.bytedesk.core.enums.PlatformEnum;
import com.bytedesk.core.rbac.user.UserEntity;
@@ -68,8 +64,9 @@ public class ActionEntity extends BaseEntity {
// action failed object
@Builder.Default
@Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
@JdbcTypeCode(SqlTypes.JSON)
// json字段格式搜索时对数据库有依赖不方便迁移
// @Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
// @JdbcTypeCode(SqlTypes.JSON)
private String extra = BytedeskConsts.EMPTY_JSON_STRING;
// private String userUid;

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2024-12-19 10:17:07
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2024-12-19 10:26:29
* @LastEditTime: 2025-02-11 17:01:26
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
* Please be aware of the BSL license restrictions before installing Bytedesk IM
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
@@ -13,9 +13,6 @@
*/
package com.bytedesk.core.feature;
import org.hibernate.annotations.JdbcTypeCode;
import org.hibernate.type.SqlTypes;
import com.bytedesk.core.base.BaseEntity;
import com.bytedesk.core.constant.BytedeskConsts;
import com.bytedesk.core.constant.TypeConsts;
@@ -52,11 +49,11 @@ public class FeatureEntity extends BaseEntity {
@Column(name = "min_version")
private String minVersion; // 最低支持版本
@Column(name = "config_schema", columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
@JdbcTypeCode(SqlTypes.JSON)
@Column(name = "config_schema", columnDefinition = TypeConsts.COLUMN_TYPE_TEXT)
// @JdbcTypeCode(SqlTypes.JSON)
private String configSchema = BytedeskConsts.EMPTY_JSON_STRING; // 配置项schema(JSON)
@Column(name = "default_config", columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
@JdbcTypeCode(SqlTypes.JSON)
@Column(name = "default_config", columnDefinition = TypeConsts.COLUMN_TYPE_TEXT)
// @JdbcTypeCode(SqlTypes.JSON)
private String defaultConfig = BytedeskConsts.EMPTY_JSON_STRING; // 默认配置(JSON)
}

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2024-01-29 16:21:24
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2024-10-23 15:22:26
* @LastEditTime: 2025-02-11 17:06:14
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
* Please be aware of the BSL license restrictions before installing Bytedesk IM
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
@@ -14,9 +14,6 @@
*/
package com.bytedesk.core.message;
import org.hibernate.annotations.JdbcTypeCode;
import org.hibernate.type.SqlTypes;
import com.bytedesk.core.base.BaseEntity;
import com.bytedesk.core.constant.BytedeskConsts;
import com.bytedesk.core.constant.TypeConsts;
@@ -57,8 +54,10 @@ public class MessageEntity extends BaseEntity {
private String content;
@Builder.Default
@Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
@JdbcTypeCode(SqlTypes.JSON)
// json字段格式搜索时对数据库有依赖不方便迁移
// @Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
// @JdbcTypeCode(SqlTypes.JSON)
@Column(length = 1024)
private String extra = BytedeskConsts.EMPTY_JSON_STRING;
@Builder.Default
@@ -78,8 +77,10 @@ public class MessageEntity extends BaseEntity {
// private User user;
// h2 db 不能使用 user, 所以重定义为 message_user
@Builder.Default
@Column(name = "message_user", columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
@JdbcTypeCode(SqlTypes.JSON)
// json字段格式搜索时对数据库有依赖不方便迁移
// @Column(name = "message_user", columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
// @JdbcTypeCode(SqlTypes.JSON)
@Column(name = "message_user")
private String user = BytedeskConsts.EMPTY_JSON_STRING;
}

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2024-06-28 17:15:48
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2024-11-07 16:16:01
* @LastEditTime: 2025-02-11 17:06:33
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
* Please be aware of the BSL license restrictions before installing Bytedesk IM
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
@@ -16,8 +16,6 @@ package com.bytedesk.core.message_unread;
import java.io.Serializable;
import java.time.LocalDateTime;
import org.hibernate.annotations.JdbcTypeCode;
import org.hibernate.type.SqlTypes;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
@@ -86,8 +84,10 @@ public class MessageUnread implements Serializable {
private String content;
@Builder.Default
@Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
@JdbcTypeCode(SqlTypes.JSON)
// json字段格式搜索时对数据库有依赖不方便迁移
// @Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
// @JdbcTypeCode(SqlTypes.JSON)
@Column(length = 1024)
private String extra = BytedeskConsts.EMPTY_JSON_STRING;
@Builder.Default
@@ -99,8 +99,8 @@ public class MessageUnread implements Serializable {
// h2 db 不能使用 user, 所以重定义为 message_user
@Builder.Default
@Column(name = "message_user", columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
@JdbcTypeCode(SqlTypes.JSON)
@Column(name = "message_user", length = 512)
// @JdbcTypeCode(SqlTypes.JSON)
private String user = BytedeskConsts.EMPTY_JSON_STRING;
// 乐观锁版本字段每次更新时版本号加1

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2024-09-01 09:27:49
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2024-12-04 17:30:02
* @LastEditTime: 2025-02-11 17:08:06
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
* Please be aware of the BSL license restrictions before installing Bytedesk IM
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
@@ -13,12 +13,8 @@
*/
package com.bytedesk.core.notification;
import org.hibernate.annotations.JdbcTypeCode;
import org.hibernate.type.SqlTypes;
import com.bytedesk.core.base.BaseEntity;
import com.bytedesk.core.constant.BytedeskConsts;
import com.bytedesk.core.constant.TypeConsts;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
@@ -55,7 +51,9 @@ public class NotificationEntity extends BaseEntity {
private String status = NotificationStatusEnum.UNREAD.name();
@Builder.Default
@Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
@JdbcTypeCode(SqlTypes.JSON)
// json字段格式搜索时对数据库有依赖不方便迁移
// @Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
// @JdbcTypeCode(SqlTypes.JSON)
@Column(length = 1024)
private String extra = BytedeskConsts.EMPTY_JSON_STRING;
}

View File

@@ -0,0 +1,16 @@
<!--
* @Author: jackning 270580156@qq.com
* @Date: 2025-02-11 17:11:33
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-02-11 17:11:37
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
* Please be aware of the BSL license restrictions before installing Bytedesk IM
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
* Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE
* contact: 270580156@qq.com
*
* Copyright (c) 2025 by bytedesk.com, All Rights Reserved.
-->
# LDAP
## Overview

View File

@@ -0,0 +1,16 @@
<!--
* @Author: jackning 270580156@qq.com
* @Date: 2025-02-11 17:11:46
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-02-11 17:11:51
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
* Please be aware of the BSL license restrictions before installing Bytedesk IM
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
* Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE
* contact: 270580156@qq.com
*
* Copyright (c) 2025 by bytedesk.com, All Rights Reserved.
-->
# LDAP
## Overview

View File

@@ -0,0 +1,16 @@
<!--
* @Author: jackning 270580156@qq.com
* @Date: 2025-02-11 17:10:20
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-02-11 17:10:24
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
* Please be aware of the BSL license restrictions before installing Bytedesk IM
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
* Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE
* contact: 270580156@qq.com
*
* Copyright (c) 2025 by bytedesk.com, All Rights Reserved.
-->
# Single Sign-On
## Overview

View File

@@ -0,0 +1,16 @@
<!--
* @Author: jackning 270580156@qq.com
* @Date: 2025-02-11 17:10:20
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-02-11 17:10:24
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
* Please be aware of the BSL license restrictions before installing Bytedesk IM
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
* Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE
* contact: 270580156@qq.com
*
* Copyright (c) 2025 by bytedesk.com, All Rights Reserved.
-->
# 单点登录
## Overview

View File

@@ -6,9 +6,6 @@ import java.util.Iterator;
import java.util.Set;
import java.util.stream.Collectors;
import org.hibernate.annotations.JdbcTypeCode;
import org.hibernate.type.SqlTypes;
import com.bytedesk.core.base.BaseEntityNoOrg;
import com.bytedesk.core.constant.AvatarConsts;
import com.bytedesk.core.constant.BytedeskConsts;
@@ -219,10 +216,12 @@ public class UserEntity extends BaseEntityNoOrg {
// }
@Builder.Default
@Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
// json字段格式搜索时对数据库有依赖不方便迁移
// @Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
// 用于兼容postgreSQL否则会报错[ERROR: column "extra" is of type json but expression is
// of type character varying
@JdbcTypeCode(SqlTypes.JSON)
// @JdbcTypeCode(SqlTypes.JSON)
@Column(columnDefinition = TypeConsts.COLUMN_TYPE_TEXT)
private String extra = BytedeskConsts.EMPTY_JSON_STRING;
// return the first organization oid

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2024-01-29 16:21:24
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-02-11 15:24:14
* @LastEditTime: 2025-02-11 17:06:52
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
* Please be aware of the BSL license restrictions before installing Bytedesk IM
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
@@ -14,13 +14,9 @@
*/
package com.bytedesk.core.thread;
import org.hibernate.annotations.JdbcTypeCode;
import org.hibernate.type.SqlTypes;
import com.alibaba.fastjson2.JSON;
import com.bytedesk.core.base.BaseEntity;
import com.bytedesk.core.constant.BytedeskConsts;
import com.bytedesk.core.constant.TypeConsts;
import com.bytedesk.core.enums.ClientEnum;
import com.bytedesk.core.rbac.user.UserEntity;
import com.bytedesk.core.rbac.user.UserProtobuf;
@@ -130,9 +126,11 @@ public class ThreadEntity extends BaseEntity {
private String client = ClientEnum.WEB.name();
@Builder.Default
@Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
// json字段格式搜索时对数据库有依赖不方便迁移
// @Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
// for postgres compatibility[ERROR: column "extra" is of type json but expression is of type character varying
@JdbcTypeCode(SqlTypes.JSON)
// @JdbcTypeCode(SqlTypes.JSON)
@Column(length = 1024)
private String extra = BytedeskConsts.EMPTY_JSON_STRING;
/**
@@ -145,8 +143,10 @@ public class ThreadEntity extends BaseEntity {
* @{UserProtobuf}
*/
@Builder.Default
@Column(name = "thread_user", columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
@JdbcTypeCode(SqlTypes.JSON)
// json字段格式搜索时对数据库有依赖不方便迁移
// @Column(name = "thread_user", columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
// @JdbcTypeCode(SqlTypes.JSON)
@Column(name = "thread_user")
private String user = BytedeskConsts.EMPTY_JSON_STRING;
/**
@@ -157,14 +157,16 @@ public class ThreadEntity extends BaseEntity {
* @{UserProtobuf}
*/
@Builder.Default
@Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
@JdbcTypeCode(SqlTypes.JSON)
// json字段格式搜索时对数据库有依赖不方便迁移
// @Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
// @JdbcTypeCode(SqlTypes.JSON)
private String agent = BytedeskConsts.EMPTY_JSON_STRING;
// multi agent assistants: monitoring agent、quality check agent、robot agent
@Builder.Default
@Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
@JdbcTypeCode(SqlTypes.JSON)
// json字段格式搜索时对数据库有依赖不方便迁移
// @Column(columnDefinition = TypeConsts.COLUMN_TYPE_JSON)
// @JdbcTypeCode(SqlTypes.JSON)
private String multiAgents = BytedeskConsts.EMPTY_JSON_STRING;
// belongs to user