Skip to content

Commit

Permalink
Merge pull request #81 from Dapp-Learning-DAO/fix/share
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
yanyanho authored Dec 11, 2023
2 parents 7bf2630 + 20fad32 commit 8e50211
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public enum CodeEnums {
MEMBER_ALREADY_REQUEST_TEAM("1007", "member already request team"),

NOT_FOUND_JD("1008", "not found jd"),
NOT_FOUND_MEMBER("1008", "not found user");
NOT_FOUND_MEMBER("1008", "not found user"),
//Sharing
SHARING_NOT_FOUND("5001", "Sharing not found"),
SHARING_NOT_OWNER("5002", "You are no sharing user"),
Expand Down
29 changes: 21 additions & 8 deletions src/main/java/com/dl/officialsite/sharing/model/db/TbShare.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
package com.dl.officialsite.sharing.model.db;

import com.dl.officialsite.sharing.constant.SharingLockStatus;
import com.dl.officialsite.sharing.constant.SharingMeetingType;
import lombok.Data;

import javax.persistence.*;

@Data
@Entity
@Table(name = "tb_share",
uniqueConstraints={@UniqueConstraint(columnNames={"theme"})},
indexes= {
@Index(columnList="member_address")
@Index(name = "IDX_THEME",unique = true, columnList = "theme"),
@Index(name = "IDX_MEMBER_ADDRESS", columnList="member_address")
})
public class TbShare {

Expand All @@ -23,64 +25,75 @@ public class TbShare {
/**
* 分享主题
*/
@Column(name = "theme", nullable = false)
private String theme;

/**
* 分享日期,2020-12-02
*/
@Column(name = "date", nullable = false)
private String date;

/**
* 分享时间 20:00(UTC+8)
*/
@Column(name = "time", nullable = false)
private String time;

/**
* 分享语言
*/
private int language; // 0 Chinese 1 English
@Column(name = "language", nullable = false)
private int language = 0; // 0 Chinese 1 English

/**
* 分享人昵称
*/
@Column(name = "presenter",nullable = false)
private String presenter;

/**
* 分享所属组织
*/
@Column(name = "org",nullable = true)
private String org;

/**
* 分享人twitter
*/
@Column(name = "twitter",nullable = true)
private String twitter;

/**
* 分享人
*/
@Column(name = "member_address")
@Column(name = "member_address",length = 40, nullable = false)
private String memberAddress;

/**
* 文档连接
*/
@Column(name = "sharing_doc")
@Column(name = "sharing_doc", nullable = true)
private String sharingDoc;

/**
* 标签类别
*/
@Column(name = "label", nullable = true)
private String label;

/**
* 锁定状态
*/
@Column(name = "lock_status")
private int lockStatus;
@Column(name = "lock_status", nullable = false)
private int lockStatus = SharingLockStatus.UNLOCKED.getCode();

private int meetingType;
@Column(name = "meeting_type", nullable = false)
private int meetingType = SharingMeetingType.TENCENT.getCode();

@Column(name = "meeting_id", nullable = true)
private String meetingId;

@Column(name = "meeting_link", nullable = true)
private String meetingLink;
}

0 comments on commit 8e50211

Please sign in to comment.