zoukankan      html  css  js  c++  java
  • 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;
     
     
  • 相关阅读:
    最长上升子序列(矩形嵌套)
    中国剩余定理模板poj1006
    POJ 2891 扩展欧几里德
    2015多校联赛第三场(部分题解)
    树链剖分
    深度理解链式前向星
    POJ 1228 Grandpa's Estate(凸包)
    旋转卡壳(一)
    最小圆覆盖 hdu 3007
    半平面求交 模板
  • 原文地址:https://www.cnblogs.com/yifanSJ/p/10148170.html
Copyright © 2011-2022 走看看