@@ -0,0 +1,2216 @@
+package com.mulodo.miniblog.pojo;%0A%0Aimport java.sql.Timestamp;%0A%0Aimport javax.persistence.Column;%0Aimport javax.persistence.Entity;%0Aimport javax.persistence.GeneratedValue;%0Aimport javax.persistence.GenerationType;%0Aimport javax.persistence.Id;%0Aimport javax.persistence.JoinColumn;%0Aimport javax.persistence.ManyToOne;%0Aimport javax.persistence.Table;%0A%0Aimport org.hibernate.annotations.Cascade;%0Aimport org.hibernate.annotations.CascadeType;%0A%0A@Entity%0A@Table(name = %22_tokes%22)%0Apublic class Token %7B%0A%0A    @Id%0A    @GeneratedValue(strategy = GenerationType.IDENTITY)%0A    private int id;%0A%0A    @Column(name = %22create_time%22)%0A    private Timestamp createTime;%0A%0A    @Column(name = %22expired_time%22)%0A    private Timestamp expiredTime;%0A%0A    // use SHA-256 to hash (username + id + current time)%0A    @Column(name = %22value%22, length = 64)%0A    private String value;%0A%0A    @ManyToOne%0A    @JoinColumn(name = %22user_id%22, referencedColumnName = %22id%22)%0A    @Cascade(CascadeType.SAVE_UPDATE)%0A    private User user;%0A%0A    /**%0A     * @return the id%0A     */%0A    public int getId() %7B%0A%09return id;%0A    %7D%0A%0A    /**%0A     * @param id%0A     *            the id to set%0A     */%0A    public void setId(int id) %7B%0A%09this.id = id;%0A    %7D%0A%0A    /**%0A     * @return the createTime%0A     */%0A    public Timestamp getCreateTime() %7B%0A%09return createTime;%0A    %7D%0A%0A    /**%0A     * @param createTime%0A     *            the createTime to set%0A     */%0A    public void setCreateTime(Timestamp createTime) %7B%0A%09this.createTime = createTime;%0A    %7D%0A%0A    /**%0A     * @return the expiredTime%0A     */%0A    public Timestamp getExpiredTime() %7B%0A%09return expiredTime;%0A    %7D%0A%0A    /**%0A     * @param expiredTime%0A     *            the expiredTime to set%0A     */%0A    public void setExpiredTime(Timestamp expiredTime) %7B%0A%09this.expiredTime = expiredTime;%0A    %7D%0A%0A    /**%0A     * @return the value%0A     */%0A    public String getValue() %7B%0A%09return value;%0A    %7D%0A%0A    /**%0A     * @param value%0A     *            the value to set%0A     */%0A    public void setValue(String value) %7B%0A%09this.value = value;%0A    %7D%0A%0A    /**%0A     * @return the user%0A     */%0A    public User getUser() %7B%0A%09return user;%0A    %7D%0A%0A    /**%0A     * @param user%0A     *            the user to set%0A     */%0A    public void setUser(User user) %7B%0A%09this.user = user;%0A    %7D%0A%7D%0A

Add Token class