package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
@JsonInclude
@TableName("life_user_third_bind")
@ApiModel("LifeUserThirdBind")
public class LifeUserThirdBind {

    public static final String PLATFORM_WECHAT = "WECHAT";
    public static final String PLATFORM_ALIPAY = "ALIPAY";

    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("life_user_id")
    @ApiModelProperty("life_user.id")
    private Integer lifeUserId;

    @TableField("platform")
    @ApiModelProperty("WECHAT / ALIPAY")
    private String platform;

    @TableField("openid")
    private String openid;

    @TableField("unionid")
    private String unionid;

    @TableField("alipay_user_id")
    private String alipayUserId;

    @TableField("account_label")
    @ApiModelProperty("昵称/展示名")
    private String accountLabel;

    @TableField("bind_phone")
    @ApiModelProperty("渠道授权手机号")
    private String bindPhone;

    @TableField("remark")
    private String remark;

    @TableLogic
    @TableField("delete_flag")
    private Integer deleteFlag;

    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;
}
