package com.hzs.common.domain.system.config;

import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hzs.common.core.annotation.Transaction;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import com.hzs.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * <p>
 * 广告banner
 * </p>
 *
 * @author hzs
 * @since 2023-04-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("BD_ADVERT_BANNER")
@KeySequence("BD_ADVERT_BANNER_SEQ")
public class BdAdvertBanner extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId("PK_ID")
    private Long pkId;

    /**
     * 发布位置 EPosition
     */
    @Transaction(transactionKey = EnumsPrefixConstants.POSITION_TOW)
    @TableField("POSITION")
    private Integer position;

    /**
     * 发布位置
     */
    @TableField(exist = false)
    private String positionVal;

    /**
     * 生效日期
     */
    @TableField("EFFECTIVE_DATE")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date effectiveDate;

    /**
     * 排序
     */
    @TableField("SORT")
    private Integer sort;

    /**
     * 图片
     */
    @TableField("PICTURE")
    private String picture;

    /**
     * 链接
     */
    @TableField("LINK")
    private String link;


}
