package com.yida.data.common.core.entity.agent;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 代理商表 Entity
 *
 * @author ZYJ
 * @date 2021-09-26 11:19:45
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("edu_agent")
public class EduAgent implements Serializable {

    private static final long serialVersionUID = -1712402383539841679L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 是否删除，1删除0未删除，默认0
     */
    @ApiModelProperty(value = "是否删除，1删除0未删除，默认0")
    @TableField("del_flag")
    @TableLogic(value = "0", delval = "1")
    private Integer delFlag;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDate;

    /**
     * 创建人id
     */
    @ApiModelProperty(value = "创建人id")
    @TableField(value = "create_id", fill = FieldFill.INSERT)
    private Long createId;

    /**
     * 最后修改时间
     */
    @ApiModelProperty(value = "最后修改时间")
    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDate;

    /**
     * 最后修改人id
     */
    @ApiModelProperty(value = "最后修改人id")
    @TableField(value = "update_id", fill = FieldFill.UPDATE)
    private Long updateId;

    /**
     * 代理商名称
     */
    @ApiModelProperty(value = "代理商名称")
    @TableField("agent_name")
    private String agentName;

    /**
     * 区域id
     */
    @ApiModelProperty(value = "区域id")
    @TableField("area_id")
    private Long areaId;

    /**
     * 负责人名称
     */
    @ApiModelProperty(value = "负责人名称")
    @TableField("principal_name")
    private String principalName;

    /**
     * 负责人电话
     */
    @ApiModelProperty(value = "负责人电话")
    @TableField("principal_phone")
    private String principalPhone;

    /**
     * 地址
     */
    @ApiModelProperty(value = "地址")
    @TableField("address")
    private String address;
}
