• JPA 及 Hibernate 相关注解


    一、Date
    @ApiModelProperty(name = "accountDate", value = "结算日")
    @Column(name="account_date", nullable=true, length = 10)
    @Temporal(TemporalType.DATE)
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date accountDate;


    二、columnDefinition
    @Column(name = "is_deleted", columnDefinition = "bit default 0")
    protected boolean deleted;
    
    
    @Column(name = "CREATED_DATE", nullable = true, updatable = false, columnDefinition = "datetime(3) default now(3)")
    protected Date createdDate;
    
    
    @Column(name="before_discount_price", nullable=false, columnDefinition = "decimal(17,2) default '0.00'")
    private BigDecimal beforeDiscountPrice = BigDecimal.ZERO;

    @Column(name="weight", nullable=false, columnDefinition = "float(10,2) default '0.00'")
    private Float weight = 0.00F;


    @Column(name="attach_base64",  columnDefinition = "text")
    private String attachBase64;
    @Column(name = "comment_count", columnDefinition = "long default '0'")
    private Long commentCount;
    @Column(name = "company_introduce", nullable = true, columnDefinition = "MEDIUMTEXT")
    private String companyIntroduce;
    @Column(name = "actual_weight", columnDefinition="double(10,3) default '0.000'")
    private Float actualWeight;
     
     
  • 相关阅读:
    Linux6
    大小超过2t的分区规划 parted命令
    fdisk命令磁盘分区
    扩展
    磁盘管理
    在Linux中如何手动创建一个用户
    Linux5
    Linux4
    19_权限和分组
    18_django的用户模型和扩展django的用户模型
  • 原文地址:https://www.cnblogs.com/yifanSJ/p/10148170.html
Copyright © 2020-2023  润新知