package com.bohuikeji.delivery.backstage.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bohuikeji.frame.module.admin.annotation.TableNewField;
import com.bohuikeji.frame.module.admin.annotation.TableQueryField;
import com.bohuikeji.frame.module.admin.annotation.TableShowField;
import com.bohuikeji.frame.module.admin.base.EntityBase;
import com.bohuikeji.frame.module.admin.entity.web.block.TextBlock;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_partner")
@ApiModel(value="TPartner对象", description="加盟合作申请表")
public class TPartner extends EntityBase<TPartner> {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value="id(新增时请留空或null)")
    @TableId(value = "partner_id", type = IdType.AUTO)
    @TableShowField(value = "ID",id = true)
    @TableNewField(show = false)
    private Integer partnerId;

    @ApiModelProperty(value = "合作人姓名")
    @TableField("partner_name")
    @TableShowField("合作人姓名")
    @TableNewField(edit = false)
    @TableQueryField(show = false)
    private String partnerName;

    @ApiModelProperty(value = "合作人电话")
    @TableField("partner_phone")
    @TableShowField("合作人电话")
    @TableNewField(edit = false)
    @TableQueryField(show = false)
    private String partnerPhone;

    @ApiModelProperty(value = "合作人城市")
    @TableField("partner_city")
    @TableShowField("合作人城市")
    @TableNewField(edit = false)
    @TableQueryField(show = false)
    private String partnerCity;

    @ApiModelProperty(value = "合作人所属行业")
    @TableField("partner_trades")
    @TableShowField("合作人所属行业")
    @TableNewField(edit = false)
    @TableQueryField(like = false)
    private String partnerTrades;

    @ApiModelProperty(value = "创建时间")
    @TableField("partner_create_time")
    @TableShowField("创建时间")
    @TableNewField(edit = false)
    @TableQueryField(like = false,sort = 0)
    private LocalDateTime partnerCreateTime;

    @ApiModelProperty(value = "合作状态")
    @TableField("partner_status")
    @TableShowField("合作状态")
    @TableNewField(options = {"已申请","处理中","已处理"})
    private String partnerStatus="已申请";

    @ApiModelProperty(value = "备注")
    @TableField("partner_rmk")
    @TableShowField("备注")
    @TableNewField(block = TextBlock.class,required = false)
    @TableQueryField(show = false)
    private String partnerRmk;
}
