package com.railway.business.push.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.railway.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
/**
 * 个推消息表
 * @author author 2021-11-22
 */
@Data
@ApiModel("个推消息表")
@EqualsAndHashCode(callSuper = true)
public class BusPushMsg extends BaseEntity{

    @ApiModelProperty(value = "主键", hidden = true)
    private Long id;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "客户端id，app端提供")
    private String clientId;

    @ApiModelProperty(value = "客户端类型：0-android;1-ios")
    private Integer clientType;

    @ApiModelProperty(value = "消息标题")
    private String title;

    @ApiModelProperty(value = "消息内容")
    private String content;

    @ApiModelProperty(value = "ios专用")
    private String iosAlertMsg;

    @ApiModelProperty(value = "推送时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date pushTime;

    @ApiModelProperty(value = "推送状态：0-未推送；1-推送成功；2-推送失败；3-服务器响应异常；")
    private String pushStatus;

    @ApiModelProperty(value = "推送结果说明")
    private String pushResultDesc;

    @ApiModelProperty(value = "推送轮数")
    private Integer pushLoop;

    public BusPushMsg() {
    }

}