| | |
| | | import com.by4cloud.platformx.common.data.mybatis.BaseModel; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.persistence.Column; |
| | | import jakarta.persistence.Entity; |
| | | import jakarta.persistence.Transient; |
| | | import jakarta.persistence.*; |
| | | import lombok.Data; |
| | | import org.hibernate.annotations.Comment; |
| | | import org.hibernate.annotations.Table; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | @Entity |
| | | @Table(appliesTo = "demo", comment = "demo") |
| | | public class Demo extends BaseModel<Demo> { |
| | | @Schema(description = "姓名") |
| | | @Column(columnDefinition="VARCHAR(64) comment '姓名'") |
| | | |
| | | @Comment("姓名") |
| | | @Column(name="name",length = 255) |
| | | private String name; |
| | | |
| | | @Schema(description = "专业") |
| | | @Column(columnDefinition="VARCHAR(64) comment '专业'") |
| | | private String jo; |
| | |
| | | @Schema(description = "test") |
| | | private String test; |
| | | |
| | | @Comment("字符串") |
| | | @Column(name="str",length = 64) |
| | | private String str; |
| | | |
| | | @Comment("long类型") |
| | | @Column(name="big_integer",length = 64) |
| | | private Long bigInteger; |
| | | |
| | | @Comment("bigDecimal") |
| | | @Column(name="big_decimal",precision=10, scale=2) |
| | | private BigDecimal bigDecimal; |
| | | |
| | | @Comment("date") |
| | | @Temporal(TemporalType.DATE) |
| | | private Date date; |
| | | |
| | | @Comment("timestamp") |
| | | @Temporal(TemporalType.TIMESTAMP) |
| | | private Date timestamp; |
| | | |
| | | @Comment("bool") |
| | | private Boolean bool; |
| | | |
| | | } |