package org.jeecg.modules.adweb.dmp.dto.google.gtm;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;

import org.apache.commons.lang3.StringUtils;
import org.jeecg.modules.adweb.dmp.dto.google.ResourceDTO;

import java.util.List;

/**
 * @author wfansh
 */
@Data
@SuperBuilder
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class GTMContainerDTO extends ResourceDTO {

    private String accountId;

    private List<String> domainNames;

    private String publicId;

    private List<String> tagIds;

    private String notes;

    private List<String> usageContext;

    private String headSnippet;

    private String bodySnippet;

    private String fingerprint;

    public static String toResourceName(String id) {
        return StringUtils.isNumeric(id) ? "accounts" + RESOURCE_NAME_SPLITTER + id : id;
    }
}
