feat: 调整内置bean
This commit is contained in:
parent
7f48c55203
commit
7758cede09
@ -5,7 +5,6 @@ import com.flyfish.framework.domain.base.AuditDomain;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
import org.springframework.data.mongodb.core.mapping.Field;
|
||||
import org.springframework.data.relational.core.mapping.Column;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
@ -21,13 +20,13 @@ import org.springframework.data.relational.core.mapping.Table;
|
||||
public class ApproveRecord extends AuditDomain {
|
||||
|
||||
// 是否已审批
|
||||
@Column
|
||||
private Boolean approved;
|
||||
|
||||
// 模块
|
||||
private String module;
|
||||
|
||||
// 模块名称
|
||||
@Column("module_name")
|
||||
private String moduleName;
|
||||
|
||||
// 数据id
|
||||
|
@ -16,7 +16,7 @@ import org.springframework.data.relational.core.mapping.Table;
|
||||
@Getter
|
||||
@Setter
|
||||
@Document(collection = "backups")
|
||||
@Table("backups")
|
||||
@Table("backup")
|
||||
public class Backup extends AuditDomain {
|
||||
|
||||
// 文件路径
|
||||
|
@ -25,7 +25,6 @@
|
||||
<dependency>
|
||||
<groupId>com.flyfish.framework</groupId>
|
||||
<artifactId>flyfish-data-relational</artifactId>
|
||||
<version>${revision}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -11,8 +11,8 @@ import org.springframework.data.relational.core.mapping.Table;
|
||||
*
|
||||
* @author wangyu
|
||||
*/
|
||||
@Document
|
||||
@Table
|
||||
@Document("departments")
|
||||
@Table("department")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
|
@ -4,7 +4,6 @@ import com.flyfish.framework.domain.tree.TreeDomain;
|
||||
import com.flyfish.framework.enums.NamedEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
@ -14,10 +13,9 @@ import org.springframework.data.relational.core.mapping.Table;
|
||||
*
|
||||
* @author wangyu
|
||||
*/
|
||||
@Document
|
||||
@Table
|
||||
@Document("permissions")
|
||||
@Table("permission")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class Permission extends TreeDomain<Permission> {
|
||||
|
||||
public static final Permission ROOT;
|
||||
|
@ -16,13 +16,12 @@ import java.util.List;
|
||||
*
|
||||
* @author wangyu
|
||||
*/
|
||||
@Document
|
||||
@Table
|
||||
@Document("roles")
|
||||
@Table("role")
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class Role extends AuditDomain {
|
||||
|
||||
/**
|
||||
|
@ -8,7 +8,10 @@ import com.flyfish.framework.enums.UserStatus;
|
||||
import com.flyfish.framework.enums.UserType;
|
||||
import com.flyfish.framework.relational.mapping.Association;
|
||||
import com.flyfish.framework.validation.spi.ConditionalGroup;
|
||||
import lombok.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
import org.springframework.data.mongodb.core.index.Indexed;
|
||||
import org.springframework.data.mongodb.core.mapping.DBRef;
|
||||
@ -19,13 +22,12 @@ import org.springframework.data.relational.core.mapping.Table;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Document
|
||||
@Table
|
||||
@Document("users")
|
||||
@Table("user")
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ConditionalGroup(codeless = true)
|
||||
public class User extends AuditDomain implements IUser {
|
||||
|
||||
@ -86,7 +88,7 @@ public class User extends AuditDomain implements IUser {
|
||||
* 所属角色
|
||||
*/
|
||||
@DBRef
|
||||
@Association(relationTable = "rel_user_depart", field = "user_id", foreignField = "depart_id")
|
||||
@Association(relationTable = "rel_user_role", field = "user_id", foreignField = "role_id")
|
||||
private List<Role> roles;
|
||||
|
||||
/**
|
||||
|
@ -24,7 +24,6 @@
|
||||
<dependency>
|
||||
<groupId>com.flyfish.framework</groupId>
|
||||
<artifactId>flyfish-data-relational</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.asyncer</groupId>
|
||||
|
@ -19,8 +19,8 @@
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-relational</artifactId>
|
||||
<groupId>com.flyfish.framework</groupId>
|
||||
<artifactId>flyfish-data-relational</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -3,7 +3,6 @@ package com.flyfish.framework.dict.domain;
|
||||
import com.flyfish.framework.domain.base.AuditDomain;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.data.annotation.Reference;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
@ -17,11 +16,10 @@ import java.util.List;
|
||||
@Getter
|
||||
@Setter
|
||||
@Document(collection = "auto-completes")
|
||||
@Table("auto_completes")
|
||||
@Table("auto_complete")
|
||||
public class AutoComplete extends AuditDomain {
|
||||
|
||||
// 候选值列表
|
||||
@Reference
|
||||
private List<String> values;
|
||||
|
||||
// 是否多级联动
|
||||
|
@ -27,7 +27,6 @@ public class Dictionary extends AuditDomain {
|
||||
// 字典描述
|
||||
private String description;
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.flyfish.framework.dict.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
/**
|
||||
* 字典表的值
|
||||
@ -9,7 +8,6 @@ import org.springframework.data.relational.core.mapping.Table;
|
||||
* @author wangyu
|
||||
*/
|
||||
@Data
|
||||
@Table("dictionary_value")
|
||||
public class DictionaryValue {
|
||||
|
||||
// 显示文字
|
||||
|
@ -3,7 +3,6 @@ package com.flyfish.framework.form.domain;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.flyfish.framework.domain.base.Domain;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.data.mongodb.core.index.CompoundIndex;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
@ -18,7 +17,6 @@ import java.util.List;
|
||||
@CompoundIndex(name = "uniq_code", def = "{code: 1}", unique = true)
|
||||
@Table("online_form")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class OnlineForm extends Domain {
|
||||
|
||||
// 表单描述
|
||||
|
@ -2,7 +2,6 @@ package com.flyfish.framework.logging.domain;
|
||||
|
||||
import com.flyfish.framework.domain.base.Domain;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
import org.springframework.data.relational.core.mapping.Table;
|
||||
|
||||
@ -11,10 +10,9 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* 日志集合
|
||||
*/
|
||||
@Document
|
||||
@Table
|
||||
@Document("logs")
|
||||
@Table("log")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class Log extends Domain {
|
||||
|
||||
// 日志类型
|
||||
|
6
pom.xml
6
pom.xml
@ -100,6 +100,12 @@
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.flyfish.framework</groupId>
|
||||
<artifactId>flyfish-data-relational</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
|
Loading…
x
Reference in New Issue
Block a user