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

import com.google.common.base.Joiner;

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;

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

    private long createTime;

    private long updateTime;

    public static String toResourceName(String id) {
        return StringUtils.isNumeric(id)
                ? Joiner.on(RESOURCE_NAME_SPLITTER).join("accounts", id)
                : id;
    }
}
