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.FileBlock;
import com.bohuikeji.frame.module.admin.enums.ColumnTypeEnum;
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="TCarousel对象", description="招商加盟入驻轮播")
@TableName("t_carousel")
public class TCarousel extends EntityBase<TCarousel> {

    @ApiModelProperty(value="轮播id")
    @TableId(value = "col_id", type = IdType.AUTO)
    @TableShowField(value = "ID",id = true)
    @TableNewField(show = false,required = false)
    private Integer colId;

    @ApiModelProperty(value = "轮播图片路径")
    @TableField("rotate_pic_url")
    @TableQueryField(show = false)
    @TableShowField(value = "轮播图片路径",type = ColumnTypeEnum.IMAGE)
    @TableNewField(block = FileBlock.class,required = false)
    private String rotatePicUrl;

    @ApiModelProperty(value = "详情链接")
    @TableField("details_link")
    @TableQueryField(show = false)
    @TableShowField(value = "详情链接")
    @TableNewField
    private String detailsLink;

    @ApiModelProperty(value = "功能备注")
    @TableField("func_remark")
    @TableShowField(value = "功能备注")
    @TableNewField()
    @TableQueryField(like = false)
    private String funcRemark;

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

    @ApiModelProperty(value = "链接类型")
    @TableField("link_type")
    @TableShowField(value = "链接类型")
    @TableNewField()
    @TableQueryField(like = false)
    private String linkType;

    @ApiModelProperty(value = "程序类型")
    @TableField("program_type")
    @TableShowField(value = "程序类型")
    @TableNewField()
    @TableQueryField(like = false)
    private String programType;

}
