123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- //
- // TSGenerateStyleModel.swift
- // AIEmoji
- //
- // Created by 100Years on 2025/2/25.
- //
- import ObjectMapper
- class TSGenerateModel: TSBaseModel {
- var imageName:String = ""
- var imageText:String = ""
- var prompt:String = ""
- var isVip:Bool = false
- var specialStyle:Int = 0 //0 普通类型,1 热门类型,2 新类型,3 max,
- var input:Bool = false //是否输入框
- var model:String = "" //走新的通道,根据内容确定
- var unionType:Int = 0 //聚合类型,相同的为一类
- var hintType:Int = 1 // 提示上传图片类型
- var template:String = "" //创建视频 V2的 模板
-
- override func mapping(map: ObjectMapper.Map) {
- imageName <- map["imageName"]
- imageText <- map["imageText"]
- prompt <- map["prompt"]
- isVip <- map["isVip"]
- specialStyle <- map["specialStyle"]
- input <- map["input"]
- model <- map["model"]
- unionType <- map["unionType"]
- hintType <- map["hintType"]
- template <- map["template"]
- }
-
- }
- class TSGenerateStyleModel: TSGenerateModel {
- var clickType:Int = 0 //0 无响应, 1空类型 2.换图
- var style:String = "" //风格类型(本地用)
- var styleId:String = "" //风格类型(网络用)
- var advance:Bool = false //走新的通道,chatgpt
-
- override func mapping(map: ObjectMapper.Map) {
- super.mapping(map: map)
- clickType <- map["clickType"]
- style <- map["style"]
- styleId <- map["styleId"]
- advance <- map["advance"]
- }
-
- var actionInfoModel:TSActionInfoModel? //对应生成的结果
- var isSelected: Bool = false //改风格,是否被选中
- var inputText:String = "" //用户自己补充的风格文字
- var upLoadImage:UIImage? //上传的图片
- var upLoadImageUrl:String? //上传的图片的 url
- var generateSize:CGSize? //生成图片的尺寸
- }
- extension TSGenerateStyleModel {
-
- var specialStyleImageNamed:String{
- if specialStyle == 1 {
- return "ptp_style_hot"
- }else if specialStyle == 2 {
- return "ptp_style_new"
- }else if specialStyle == 3 {
- return "ptp_style_max"
- }
- return ""
- }
- }
|