BusPatientEntity.java 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package com.coffee.bus.entity;
  2. import com.baomidou.mybatisplus.annotation.FieldFill;
  3. import com.baomidou.mybatisplus.annotation.TableField;
  4. import com.baomidou.mybatisplus.annotation.TableLogic;
  5. import com.baomidou.mybatisplus.annotation.TableName;
  6. import com.coffee.common.entity.TenantGenericEntity;
  7. import com.coffee.common.enums.SexEnum;
  8. import io.swagger.annotations.ApiModel;
  9. import io.swagger.annotations.ApiModelProperty;
  10. import lombok.Data;
  11. import lombok.EqualsAndHashCode;
  12. import org.apache.ibatis.type.EnumOrdinalTypeHandler;
  13. import org.hibernate.validator.constraints.Length;
  14. /**
  15. * @author lifang
  16. * @version 1.0.0
  17. * @ClassName BusDoctorEntity.java
  18. * @Description TODO
  19. * @createTime 2022年03月21日 11:17:00
  20. */
  21. @EqualsAndHashCode(callSuper = true)
  22. @Data
  23. @TableName(value = "bus_patient",autoResultMap = true)
  24. @ApiModel(value="住院病人基本信息", description="住院病人基本信息实体类")
  25. public class BusPatientEntity extends TenantGenericEntity<String,String> {
  26. @ApiModelProperty(value = "病号")
  27. @Length(max = 255,message = "病号长度不得超过255个字节")
  28. private String code;
  29. @ApiModelProperty(value = "病人名称")
  30. @Length(max = 255,message = "医生岗位长度不得超过255个字节")
  31. private String name;
  32. @TableField(typeHandler = EnumOrdinalTypeHandler.class)
  33. @ApiModelProperty(value = "性别")
  34. private SexEnum gender;
  35. @TableField(fill = FieldFill.INSERT)
  36. @TableLogic(value = "0",delval = "1")
  37. private Integer isDelete;
  38. }