content: package cn.itbat.microsoft.model.entity;
  
  import com.fasterxml.jackson.annotation.JsonFormat;
  import lombok.AllArgsConstructor;
  import lombok.Builder;
  import lombok.Data;
  import lombok.NoArgsConstructor;
  import org.springframework.format.annotation.DateTimeFormat;
  
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import java.util.Date;
  
  /**
   * @author huahui.wu
   * @date 2020年11月24日 14:53:11
   */
  @Entity(name = "INVITATION_CODE")
  @Data
  @Builder
  @NoArgsConstructor
  @AllArgsConstructor
  public class InvitationCode {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Integer id;
  
      /**
       * 邀请码
       */
      private String code;
  
      /**
       * 是否有效
       */
      private Boolean valid;
  
      /**
       * 失效时间
       */
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
      @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
      private Date expirationTime;
  
      /**
       * 被邀请用户
       */
      private String invitedUser;
  
      /**
       * 订阅
       */
      private String subscribe;
  
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
      @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
      private Date createTime;
  
  }
  