package com.brframework.webapppatch.entity;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.time.LocalDateTime;

/**
 * 热更新灰度用户
 * @author xu
 * @date 2019/11/14 10:24
 */
@Entity
@Data
@Builder
@NoArgsConstructor
@ApiModel
@AllArgsConstructor
@Table(name = "sys_patch_gray_user")
public class PatchGrayUser {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "id", required = true, example = "1")
    Long id;

    @ApiModelProperty(value = "用户名", example = "13570578184")
    @Column(unique = true, nullable = false)
    private String username;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", required = true, example = "2018-03-13 15:26:19")
    @Column(updatable = false)
    LocalDateTime createDate;

}
