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.TableKeyField;
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.TFranchiseeInformation;
import com.bohuikeji.frame.module.admin.entity.web.block.SelectBlock;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 管理站长表
 * </p>
 * @author 10552
 * @since 2019-08-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="TManage对象", description="管理站长表")
@TableName("t_manage")
public class TManage extends EntityBase<TManage> {

    @ApiModelProperty(value="管理人id")
    @TableId(value = "manage_id", type = IdType.AUTO)
    @TableShowField(value = "ID",id = true)
    @TableNewField(show = false,required = false)
    private Integer manageId;

    @ApiModelProperty(value = "所属加盟商")
    @TableField("fran_id")
    @TableShowField(value = "所属加盟商")
    @TableKeyField(table = "t_franchisee_information",keyShowFields = "fran_name",where = "fran_id in(##FRAN_IDS##)",key = TFranchiseeInformation.class)
    @TableNewField(block = SelectBlock.class)
    private Integer franId;

    @ApiModelProperty(value = "管理人姓名")
    @TableField("manage_name")
    @TableQueryField(show = false)
    @TableShowField(value = "管理人姓名")
    @TableNewField()
    private String manageName;

    @ApiModelProperty(value = "管理人手机号")
    @TableField("manage_phone")
    @TableQueryField(show = false)
    @TableShowField(value = "管理人手机号")
    @TableNewField
    private String managePhone;

    @ApiModelProperty(value = "管理区域")
    @TableField("manage_region")
    @TableShowField(value = "管理区域")
    @TableNewField()
    @TableQueryField(like = false)
    private String manageRegion;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    @TableShowField(value = "创建时间",show = false)
    private LocalDateTime createTime=LocalDateTime.now();


}
