package com.xueyi.system.digitalmans.domain.merge;

import com.baomidou.mybatisplus.annotation.*;
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.TBasisEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serial;

import static com.xueyi.system.api.digitalmans.domain.merge.MergeGroup.Reception_DmReceptionVisitorMerge_GROUP;
import static com.xueyi.system.api.digitalmans.domain.merge.MergeGroup.Visitor_DmReceptionVisitorMerge_GROUP;

/**
 * 任务访客关联 持久化对象
 *
 * @author xueyi
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("dm_reception_visitor_merge")
public class DmReceptionVisitorMerge extends TBasisEntity {

    @Serial
    private static final long serialVersionUID = 1L;


    /** 招待任务id */
    @Correlations({
            @Correlation(groupName = Reception_DmReceptionVisitorMerge_GROUP, keyType = OperateConstants.SubKeyType.MERGE_MAIN),
            @Correlation(groupName = Visitor_DmReceptionVisitorMerge_GROUP, keyType = OperateConstants.SubKeyType.MERGE_SLAVE)
    })
    protected Long receptionId;

    /** 访客id */
    @Correlations({
            @Correlation(groupName = Visitor_DmReceptionVisitorMerge_GROUP, keyType = OperateConstants.SubKeyType.MERGE_MAIN),
            @Correlation(groupName = Reception_DmReceptionVisitorMerge_GROUP, keyType = OperateConstants.SubKeyType.MERGE_SLAVE)
    })
    protected Long visitorId;

    /** 优先级 */
    protected Integer priority;

    public DmReceptionVisitorMerge(Long receptionId, Long visitorId, Integer priority) {
        this.receptionId = receptionId;
        this.visitorId = visitorId;
        this.priority = priority;
    }
}