package com.wall.engine.wallpaper;

public class WallpaperItem {
    private String id; // 确保这个字段存在
    private String alt_description;
    private Urls urls;
    private User user;


    public String getId() {

        if (id != null && !id.isEmpty()) {
            return id;
        }

        if (urls != null && urls.getRegular() != null) {

            return "wallpaper_" + Math.abs(urls.getRegular().hashCode());
        }

        return "wallpaper_" + System.currentTimeMillis();
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAlt_description() {
        return alt_description;
    }

    public void setAlt_description(String alt_description) {
        this.alt_description = alt_description;
    }

    public Urls getUrls() {
        return urls;
    }

    public void setUrls(Urls urls) {
        this.urls = urls;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

//    public   class Urls {
//
//    }

//    public   class User {
//
//    }
}