feat: 增加注解联动
This commit is contained in:
parent
a0417f6409
commit
ea79cc5ae4
@ -1,20 +1,18 @@
|
|||||||
package dev.flyfish.framework.approval.domain.record;
|
package dev.flyfish.framework.approval.domain.record;
|
||||||
|
|
||||||
|
import dev.flyfish.framework.annotations.Entity;
|
||||||
|
import dev.flyfish.framework.annotations.Property;
|
||||||
import dev.flyfish.framework.approval.enums.ApproveAction;
|
import dev.flyfish.framework.approval.enums.ApproveAction;
|
||||||
import dev.flyfish.framework.domain.base.AuditDomain;
|
import dev.flyfish.framework.domain.base.AuditDomain;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
|
||||||
import org.springframework.data.relational.core.mapping.Column;
|
|
||||||
import org.springframework.data.relational.core.mapping.Table;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审批记录
|
* 审批记录
|
||||||
*
|
*
|
||||||
* @author wangyu
|
* @author wangyu
|
||||||
*/
|
*/
|
||||||
@Document(collection = "approve-records")
|
@Entity(table = "t_approve_records", collection = "approve-records")
|
||||||
@Table("t_approve_records")
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class ApproveRecord extends AuditDomain {
|
public class ApproveRecord extends AuditDomain {
|
||||||
@ -26,11 +24,11 @@ public class ApproveRecord extends AuditDomain {
|
|||||||
private String module;
|
private String module;
|
||||||
|
|
||||||
// 模块名称
|
// 模块名称
|
||||||
@Column("module_name")
|
@Property(column = "module_name")
|
||||||
private String moduleName;
|
private String moduleName;
|
||||||
|
|
||||||
// 数据id
|
// 数据id
|
||||||
@Column("data_id")
|
@Property(column = "data_id")
|
||||||
private String dataId;
|
private String dataId;
|
||||||
|
|
||||||
// 审批人
|
// 审批人
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
package dev.flyfish.framework.backup.domain;
|
package dev.flyfish.framework.backup.domain;
|
||||||
|
|
||||||
|
import dev.flyfish.framework.annotations.Entity;
|
||||||
import dev.flyfish.framework.domain.base.AuditDomain;
|
import dev.flyfish.framework.domain.base.AuditDomain;
|
||||||
import dev.flyfish.framework.enums.NamedEnum;
|
import dev.flyfish.framework.enums.NamedEnum;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
|
||||||
import org.springframework.data.relational.core.mapping.Table;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统备份
|
* 系统备份
|
||||||
@ -15,8 +14,7 @@ import org.springframework.data.relational.core.mapping.Table;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Document(collection = "backups")
|
@Entity(collection = "backups", table = "t_backup")
|
||||||
@Table("t_backup")
|
|
||||||
public class Backup extends AuditDomain {
|
public class Backup extends AuditDomain {
|
||||||
|
|
||||||
// 文件路径
|
// 文件路径
|
||||||
|
@ -0,0 +1,53 @@
|
|||||||
|
package dev.flyfish.framework.annotations;
|
||||||
|
|
||||||
|
import org.springframework.core.annotation.AliasFor;
|
||||||
|
import org.springframework.data.mongodb.core.mapping.Document;
|
||||||
|
import org.springframework.data.relational.core.mapping.Table;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体表示
|
||||||
|
* 同时兼容mongo和mysql
|
||||||
|
*
|
||||||
|
* @author wangyu
|
||||||
|
*/
|
||||||
|
@Target(ElementType.TYPE)
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Documented
|
||||||
|
@Document
|
||||||
|
@Table
|
||||||
|
public @interface Entity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示名称
|
||||||
|
*
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@AliasFor("title")
|
||||||
|
String value() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示名称(别名)
|
||||||
|
*
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@AliasFor("value")
|
||||||
|
String title() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表名
|
||||||
|
*
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@AliasFor(annotation = Table.class, attribute = "value")
|
||||||
|
String table() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* mongodb集合名
|
||||||
|
*
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@AliasFor(annotation = Document.class, attribute = "value")
|
||||||
|
String collection() default "";
|
||||||
|
}
|
@ -1,6 +1,8 @@
|
|||||||
package dev.flyfish.framework.annotations;
|
package dev.flyfish.framework.annotations;
|
||||||
|
|
||||||
import org.springframework.core.annotation.AliasFor;
|
import org.springframework.core.annotation.AliasFor;
|
||||||
|
import org.springframework.data.mongodb.core.mapping.Field;
|
||||||
|
import org.springframework.data.relational.core.mapping.Column;
|
||||||
|
|
||||||
import java.lang.annotation.*;
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
@ -13,6 +15,8 @@ import java.lang.annotation.*;
|
|||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Documented
|
@Documented
|
||||||
@Repeatable(Properties.class)
|
@Repeatable(Properties.class)
|
||||||
|
@Column
|
||||||
|
@Field
|
||||||
public @interface Property {
|
public @interface Property {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -20,8 +24,17 @@ public @interface Property {
|
|||||||
*
|
*
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@AliasFor(annotation = Field.class, attribute = "value")
|
||||||
String key() default "";
|
String key() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指定数据库列名
|
||||||
|
*
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@AliasFor(annotation = Column.class, attribute = "value")
|
||||||
|
String column() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示标题
|
* 显示标题
|
||||||
*
|
*
|
||||||
|
@ -34,9 +34,7 @@ public @interface QueryField {
|
|||||||
Type type() default Type.EQ;
|
Type type() default Type.EQ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拼接在某个字段前
|
* @return 拼接在某个字段前
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
*/
|
||||||
String before() default "";
|
String before() default "";
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ import org.springframework.data.annotation.CreatedBy;
|
|||||||
import org.springframework.data.annotation.CreatedDate;
|
import org.springframework.data.annotation.CreatedDate;
|
||||||
import org.springframework.data.annotation.LastModifiedBy;
|
import org.springframework.data.annotation.LastModifiedBy;
|
||||||
import org.springframework.data.annotation.LastModifiedDate;
|
import org.springframework.data.annotation.LastModifiedDate;
|
||||||
import org.springframework.data.relational.core.mapping.Column;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
@ -24,16 +23,14 @@ public abstract class AuditDomain extends Domain {
|
|||||||
* 创建日期
|
* 创建日期
|
||||||
*/
|
*/
|
||||||
@CreatedDate
|
@CreatedDate
|
||||||
@Property(value = "创建日期", readonly = true)
|
@Property(value = "创建日期", column = "create_time", readonly = true)
|
||||||
@Column("create_time")
|
|
||||||
protected LocalDateTime createTime;
|
protected LocalDateTime createTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改日期
|
* 修改日期
|
||||||
*/
|
*/
|
||||||
@LastModifiedDate
|
@LastModifiedDate
|
||||||
@Property(value = "更新日期", readonly = true)
|
@Property(value = "更新日期", column = "modify_time", readonly = true)
|
||||||
@Column("modify_time")
|
|
||||||
protected LocalDateTime modifyTime;
|
protected LocalDateTime modifyTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -46,8 +43,7 @@ public abstract class AuditDomain extends Domain {
|
|||||||
/**
|
/**
|
||||||
* 创建人id
|
* 创建人id
|
||||||
*/
|
*/
|
||||||
@Property(readonly = true)
|
@Property(column = "creator_id", readonly = true)
|
||||||
@Column("creator_id")
|
|
||||||
protected String creatorId;
|
protected String creatorId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -60,7 +56,6 @@ public abstract class AuditDomain extends Domain {
|
|||||||
/**
|
/**
|
||||||
* 修改人id
|
* 修改人id
|
||||||
*/
|
*/
|
||||||
@Property(readonly = true)
|
@Property(column = "modifier_id", readonly = true)
|
||||||
@Column("modifier_id")
|
|
||||||
protected String modifierId;
|
protected String modifierId;
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,16 @@
|
|||||||
package dev.flyfish.framework.domain.po;
|
package dev.flyfish.framework.domain.po;
|
||||||
|
|
||||||
|
import dev.flyfish.framework.annotations.Entity;
|
||||||
|
import dev.flyfish.framework.annotations.Property;
|
||||||
import dev.flyfish.framework.domain.tree.TreeDomain;
|
import dev.flyfish.framework.domain.tree.TreeDomain;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
|
||||||
import org.springframework.data.relational.core.mapping.Column;
|
|
||||||
import org.springframework.data.relational.core.mapping.Table;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门
|
* 部门
|
||||||
*
|
*
|
||||||
* @author wangyu
|
* @author wangyu
|
||||||
*/
|
*/
|
||||||
@Document("departments")
|
@Entity(table = "t_department", collection = "departments")
|
||||||
@Table("t_department")
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@ -25,7 +23,7 @@ public class Department extends TreeDomain<Department> {
|
|||||||
/**
|
/**
|
||||||
* 部门的完整名称
|
* 部门的完整名称
|
||||||
*/
|
*/
|
||||||
@Column("full_name")
|
@Property(column = "full_name")
|
||||||
private String fullName;
|
private String fullName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
package dev.flyfish.framework.domain.po;
|
package dev.flyfish.framework.domain.po;
|
||||||
|
|
||||||
|
import dev.flyfish.framework.annotations.Entity;
|
||||||
import dev.flyfish.framework.domain.base.AuditDomain;
|
import dev.flyfish.framework.domain.base.AuditDomain;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
|
||||||
import org.springframework.data.relational.core.mapping.Table;
|
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -15,8 +14,7 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Document(collection = "excel-mappings")
|
@Entity(table = "t_excel_mapping", collection = "excel-mappings")
|
||||||
@Table("t_excel_mapping")
|
|
||||||
public class ExcelMapping extends AuditDomain {
|
public class ExcelMapping extends AuditDomain {
|
||||||
|
|
||||||
// 映射关系
|
// 映射关系
|
||||||
|
@ -1,20 +1,18 @@
|
|||||||
package dev.flyfish.framework.domain.po;
|
package dev.flyfish.framework.domain.po;
|
||||||
|
|
||||||
|
import dev.flyfish.framework.annotations.Entity;
|
||||||
import dev.flyfish.framework.domain.tree.TreeDomain;
|
import dev.flyfish.framework.domain.tree.TreeDomain;
|
||||||
import dev.flyfish.framework.enums.NamedEnum;
|
import dev.flyfish.framework.enums.NamedEnum;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
|
||||||
import org.springframework.data.relational.core.mapping.Table;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 权限
|
* 权限
|
||||||
*
|
*
|
||||||
* @author wangyu
|
* @author wangyu
|
||||||
*/
|
*/
|
||||||
@Document("permissions")
|
@Entity(table = "t_permission", collection = "permissions")
|
||||||
@Table("t_permission")
|
|
||||||
@Data
|
@Data
|
||||||
public class Permission extends TreeDomain<Permission> {
|
public class Permission extends TreeDomain<Permission> {
|
||||||
|
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
package dev.flyfish.framework.domain.po;
|
package dev.flyfish.framework.domain.po;
|
||||||
|
|
||||||
|
import dev.flyfish.framework.annotations.Entity;
|
||||||
import dev.flyfish.framework.domain.base.AuditDomain;
|
import dev.flyfish.framework.domain.base.AuditDomain;
|
||||||
import dev.flyfish.framework.enums.NamedEnum;
|
import dev.flyfish.framework.enums.NamedEnum;
|
||||||
import dev.flyfish.framework.enums.RoleType;
|
import dev.flyfish.framework.enums.RoleType;
|
||||||
import dev.flyfish.framework.relational.mapping.Association;
|
import dev.flyfish.framework.relational.mapping.Association;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import org.springframework.data.mongodb.core.mapping.DBRef;
|
import org.springframework.data.mongodb.core.mapping.DBRef;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
|
||||||
import org.springframework.data.relational.core.mapping.Table;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -16,8 +15,7 @@ import java.util.List;
|
|||||||
*
|
*
|
||||||
* @author wangyu
|
* @author wangyu
|
||||||
*/
|
*/
|
||||||
@Document("roles")
|
@Entity(table = "t_role", collection = "roles")
|
||||||
@Table("t_role")
|
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@ -2,6 +2,8 @@ package dev.flyfish.framework.domain.po;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import dev.flyfish.framework.annotations.Entity;
|
||||||
|
import dev.flyfish.framework.annotations.Property;
|
||||||
import dev.flyfish.framework.domain.base.AuditDomain;
|
import dev.flyfish.framework.domain.base.AuditDomain;
|
||||||
import dev.flyfish.framework.domain.base.IUser;
|
import dev.flyfish.framework.domain.base.IUser;
|
||||||
import dev.flyfish.framework.enums.UserStatus;
|
import dev.flyfish.framework.enums.UserStatus;
|
||||||
@ -15,15 +17,12 @@ import lombok.NoArgsConstructor;
|
|||||||
import org.springframework.data.annotation.Transient;
|
import org.springframework.data.annotation.Transient;
|
||||||
import org.springframework.data.mongodb.core.index.Indexed;
|
import org.springframework.data.mongodb.core.index.Indexed;
|
||||||
import org.springframework.data.mongodb.core.mapping.DBRef;
|
import org.springframework.data.mongodb.core.mapping.DBRef;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
|
||||||
import org.springframework.data.relational.core.mapping.Column;
|
import org.springframework.data.relational.core.mapping.Column;
|
||||||
import org.springframework.data.relational.core.mapping.Table;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Document("users")
|
@Entity(table = "t_user", collection = "users", title = "用户表")
|
||||||
@Table("t_user")
|
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@ -74,7 +73,7 @@ public class User extends AuditDomain implements IUser {
|
|||||||
* 有效期
|
* 有效期
|
||||||
*/
|
*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@Column("valid_date")
|
@Property(column = "valid_date")
|
||||||
private LocalDateTime validDate;
|
private LocalDateTime validDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package dev.flyfish.test.mongo.repository;
|
package dev.flyfish.test.mongo.repository;
|
||||||
|
|
||||||
|
import dev.flyfish.framework.annotations.Entity;
|
||||||
import dev.flyfish.framework.domain.base.AuditDomain;
|
import dev.flyfish.framework.domain.base.AuditDomain;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
|
||||||
|
|
||||||
@Document("test")
|
@Entity(table = "test", collection = "test")
|
||||||
@Data
|
@Data
|
||||||
public class TestDO extends AuditDomain {
|
public class TestDO extends AuditDomain {
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
package dev.flyfish.framework.dict.domain;
|
package dev.flyfish.framework.dict.domain;
|
||||||
|
|
||||||
|
import dev.flyfish.framework.annotations.Entity;
|
||||||
import dev.flyfish.framework.domain.base.AuditDomain;
|
import dev.flyfish.framework.domain.base.AuditDomain;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
|
||||||
import org.springframework.data.relational.core.mapping.Table;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -15,8 +14,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Document(collection = "auto-completes")
|
@Entity(table = "t_auto_complete", collection = "auto-completes")
|
||||||
@Table("t_auto_complete")
|
|
||||||
public class AutoComplete extends AuditDomain {
|
public class AutoComplete extends AuditDomain {
|
||||||
|
|
||||||
// 候选值列表
|
// 候选值列表
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
package dev.flyfish.framework.dict.domain;
|
package dev.flyfish.framework.dict.domain;
|
||||||
|
|
||||||
|
import dev.flyfish.framework.annotations.Entity;
|
||||||
import dev.flyfish.framework.domain.base.AuditDomain;
|
import dev.flyfish.framework.domain.base.AuditDomain;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
|
||||||
import org.springframework.data.relational.core.mapping.Table;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@ -17,8 +16,7 @@ import java.util.Objects;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Document(collection = "dictionaries")
|
@Entity(table = "t_dictionary", collection = "dictionaries")
|
||||||
@Table("t_dictionary")
|
|
||||||
public class Dictionary extends AuditDomain {
|
public class Dictionary extends AuditDomain {
|
||||||
|
|
||||||
// 字典表的值
|
// 字典表的值
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
package dev.flyfish.framework.file.domain;
|
package dev.flyfish.framework.file.domain;
|
||||||
|
|
||||||
|
import dev.flyfish.framework.annotations.Entity;
|
||||||
import dev.flyfish.framework.annotations.Property;
|
import dev.flyfish.framework.annotations.Property;
|
||||||
import dev.flyfish.framework.domain.base.AuditDomain;
|
import dev.flyfish.framework.domain.base.AuditDomain;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
|
||||||
import org.springframework.data.relational.core.mapping.Table;
|
|
||||||
|
|
||||||
@Document(collection = "attachments")
|
@Entity(table = "t_attachment", collection = "attachments")
|
||||||
@Table("t_attachment")
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
package dev.flyfish.framework.form.domain;
|
package dev.flyfish.framework.form.domain;
|
||||||
|
|
||||||
|
import dev.flyfish.framework.annotations.Entity;
|
||||||
import dev.flyfish.framework.bean.ObjectMap;
|
import dev.flyfish.framework.bean.ObjectMap;
|
||||||
import dev.flyfish.framework.domain.base.Domain;
|
import dev.flyfish.framework.domain.base.Domain;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.data.mongodb.core.index.CompoundIndex;
|
import org.springframework.data.mongodb.core.index.CompoundIndex;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
|
||||||
import org.springframework.data.relational.core.mapping.Table;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -13,9 +12,8 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 在线表单
|
* 在线表单
|
||||||
*/
|
*/
|
||||||
@Document("online-forms")
|
@Entity(table = "t_online_form", collection = "online")
|
||||||
@CompoundIndex(name = "uniq_code", def = "{code: 1}", unique = true)
|
@CompoundIndex(name = "uniq_code", def = "{code: 1}", unique = true)
|
||||||
@Table("t_online_form")
|
|
||||||
@Data
|
@Data
|
||||||
public class OnlineForm extends Domain {
|
public class OnlineForm extends Domain {
|
||||||
|
|
||||||
|
@ -1,18 +1,16 @@
|
|||||||
package dev.flyfish.framework.logging.domain;
|
package dev.flyfish.framework.logging.domain;
|
||||||
|
|
||||||
|
import dev.flyfish.framework.annotations.Entity;
|
||||||
import dev.flyfish.framework.domain.base.Domain;
|
import dev.flyfish.framework.domain.base.Domain;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.data.mongodb.core.mapping.Document;
|
|
||||||
import org.springframework.data.relational.core.mapping.Column;
|
import org.springframework.data.relational.core.mapping.Column;
|
||||||
import org.springframework.data.relational.core.mapping.Table;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日志集合
|
* 日志集合
|
||||||
*/
|
*/
|
||||||
@Document("logs")
|
@Entity(table = "t_log", collection = "logs")
|
||||||
@Table("t_log")
|
|
||||||
@Data
|
@Data
|
||||||
public class Log extends Domain {
|
public class Log extends Domain {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user