package com.brframework.commonapppush.json;

import com.alibaba.fastjson.annotation.JSONField;
import com.brframework.commoncms.annatotion.column.HideColumn;
import com.brframework.commoncms.annatotion.column.SelectColumn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.time.LocalDateTime;

/**
 * @author xu
 * @date 2019/11/20 11:36
 */
@ApiModel
@Data
public class PushLogSimpleResult {

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

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", required = true, example = "2019-04-24 16:23:19")
    @Column(updatable = false)
    LocalDateTime createDate;

    @ApiModelProperty(value = "消息类型")
    @SelectColumn(options = {"unicast,单播", "listcast,列播", "filecast,文件播", "broadcast,广播", "groupcast,组播"})
    String messageType;

    @ApiModelProperty(value = "状态")
    @SelectColumn(options = {"1,已发送", "2,失败"})
    Integer status;

    @ApiModelProperty(value = "系统")
    String os;

    @ApiModelProperty(value = "系统用户标识")
    String userTokens;

    @ApiModelProperty(value = "消息描述")
    String description;

}
