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

import com.baomidou.mybatisplus.annotation.TableName;
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.Broadcast_DmBroadcastResource_GROUP;
import static com.xueyi.system.api.digitalmans.domain.merge.MergeGroup.Resource_DmBroadcastResource_GROUP;

/**
 * 播报资源关联 持久化对象
 *
 * @author xueyi
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("dm_broadcast_resource_merge")
public class DmBroadcastResourceMerge extends TBasisEntity {

    @Serial
    private static final long serialVersionUID = 1L;


    /** 播报任务id */
    @Correlations({
            @Correlation(groupName = Broadcast_DmBroadcastResource_GROUP, keyType = OperateConstants.SubKeyType.MERGE_MAIN),
            @Correlation(groupName = Resource_DmBroadcastResource_GROUP, keyType = OperateConstants.SubKeyType.MERGE_SLAVE)
    })
    protected Long broadcastId;

    /** 资源id */
    @Correlations({
            @Correlation(groupName = Broadcast_DmBroadcastResource_GROUP, keyType = OperateConstants.SubKeyType.MERGE_MAIN),
            @Correlation(groupName = Resource_DmBroadcastResource_GROUP, keyType = OperateConstants.SubKeyType.MERGE_SLAVE)
    })
    protected Long resourceId;


    protected String ttsText;

    public DmBroadcastResourceMerge(Long broadcastId, Long resourceId) {
        this.broadcastId = broadcastId;
        this.resourceId = resourceId;
    }
}