package com.ruoyi.ai.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * AI-客户配置对象 ai_customer
 *
 * @author shi
 * @date 2025-11-26
 */
@Data
public class AiImage extends BaseEntity {

    private static final long serialVersionUID = 1L;

   private Long uid;
   private String url;

   public static List<AiImage> getList(String url) {
       String[] urls = url.split(" ");
       List<AiImage> aiImages = new ArrayList<>();
       for (String s : urls) {
           AiImage aiImage = new AiImage();
           aiImage.setUrl(s);
           aiImages.add(aiImage);
       }
       return aiImages;
   }


    public static String getUrl(List<AiImage> bannerUrls) {
       String url = "";
       for (AiImage aiImage : bannerUrls) {
           url += aiImage.getUrl() + " ";
       }
       return url.trim();
    }
}
