content: package com.wangboot.system.entity;
  
  import com.fasterxml.jackson.annotation.JsonIgnore;
  import com.mybatisflex.annotation.Id;
  import com.mybatisflex.annotation.KeyType;
  import com.mybatisflex.annotation.Table;
  import com.mybatisflex.core.keygen.KeyGenerators;
  import com.wangboot.model.entity.IUniqueEntity;
  import com.wangboot.model.entity.IdEntity;
  import com.wangboot.model.entity.event.EnableOperationLog;
  import com.wangboot.model.entity.impl.CommonEntity;
  import com.wangboot.system.entity.table.SysDataScopeTableDef;
  import com.wangboot.system.listener.EntityChangeListener;
  import javax.validation.constraints.NotBlank;
  import javax.validation.constraints.Size;
  import lombok.AllArgsConstructor;
  import lombok.Data;
  import lombok.EqualsAndHashCode;
  import lombok.NoArgsConstructor;
  
  /**
   * 实体类。
   *
   * @author wwtg99
   */
  @Data
  @EqualsAndHashCode(callSuper = false)
  @NoArgsConstructor
  @AllArgsConstructor
  @EnableOperationLog
  @Table(
      value = "wb_sys_data_scope",
      onInsert = EntityChangeListener.class,
      onUpdate = EntityChangeListener.class)
  public class SysDataScope extends CommonEntity implements IdEntity<String>, IUniqueEntity {
  
    @Id(keyType = KeyType.Generator, value = KeyGenerators.snowFlakeId)
    private String id;
  
    @NotBlank(message = "message.name_not_blank")
    @Size(max = 90)
    private String name;
  
    @Override
    @JsonIgnore
    public String[][] getUniqueTogetherFields() {
      return new String[][] {{SysDataScopeTableDef.SYS_DATA_SCOPE.NAME.getName()}};
    }
  }
  