package org.jeecg.modules.adweb.databridge.dto.google.analytics;

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.databridge.dto.google.ResourceDTO;

import java.util.List;

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

    private String propertyType;

    private String accountResourceName;

    private String parentResourceName;

    private String industryCategory;

    private String timeZone;

    private String currencyCode;

    private String serviceLevel;

    private long createTime;

    private long updateTime;

    private List<GADataStreamDTO> dataStreams;

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