package com.xueyi.system.resource.domain.po;

import com.xueyi.common.core.annotation.Correlation;
import com.xueyi.common.core.annotation.Correlations;
import com.xueyi.common.core.constant.basic.OperateConstants;
import com.xueyi.common.core.web.tenant.base.TBaseEntity;
import com.xueyi.system.resource.domain.dto.DmBackgroundDto;
import com.xueyi.common.core.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.io.Serial;

import static com.xueyi.common.core.constant.basic.EntityConstants.*;
import static com.xueyi.system.resource.domain.merge.MergeGroup.Background_Resource_GROUP;

/**
 * 背景图素材 持久化对象
 *
 * @author xueyi
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "dm_background", excludeProperty = { UPDATE_BY, SORT, CREATE_BY, DEL_FLAG, REMARK })
public class DmBackgroundPo extends TBaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /** 使用状态 */
    @Excel(name = "使用状态")
    protected String status;

    /** 资源类型 */
    @Excel(name = "资源类型")
    protected Integer type;

    /** resource_id */
    @NotNull(message = "resourceId不能为空")
    @Correlations({
            @Correlation(groupName = Background_Resource_GROUP, keyType = OperateConstants.SubKeyType.MAIN)
    })

    @Excel(name = "resource_id")
    protected Long resourceId;

}