package dao import "lone-services/pkg/utils" const ( FaceppMapTypeAcne = "acne" FaceppMapTypeClosedComedones = "closed_comedones" FaceppMapTypeBrownSpot = "brown_spot" FaceppMapTypeMole = "mole" ) type FaceppMapMeta struct { Type string NameCN string NameEN string } var FaceppMapTypeMeta = []FaceppMapMeta{ {Type: FaceppMapTypeAcne, NameCN: "痤疮", NameEN: "acne"}, {Type: FaceppMapTypeClosedComedones, NameCN: "粉刺", NameEN: "comedones"}, {Type: FaceppMapTypeBrownSpot, NameCN: "色斑", NameEN: "spot"}, {Type: FaceppMapTypeMole, NameCN: "痣", NameEN: "mole"}, } type FaceppAnalysis struct { Id int64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"` TaskId string `gorm:"column:task_id" json:"task_id"` OriginalPath string `gorm:"column:original_path" json:"original_path"` ExpandPath string `gorm:"column:expand_path" json:"expand_path"` RequestId string `gorm:"column:request_id" json:"request_id"` Result string `gorm:"column:result" json:"result"` LeftSideResult string `gorm:"column:left_side_result" json:"left_side_result"` RightSideResult string `gorm:"column:right_side_result" json:"right_side_result"` ResultPath string `gorm:"column:result_path" json:"result_path"` ResultOssPath string `gorm:"column:result_oss_path" json:"result_oss_path"` FaceTop int `gorm:"column:face_top" json:"face_top"` FaceLeft int `gorm:"column:face_left" json:"face_left"` FaceWidth int `gorm:"column:face_width" json:"face_width"` FaceHeight int `gorm:"column:face_height" json:"face_height"` TimeUsed int `gorm:"column:time_used" json:"time_used"` ErrorMessage string `gorm:"column:error_message" json:"error_message"` CreatedAt utils.CustomTime `gorm:"column:created_at" json:"created_at"` } type FaceppMap struct { Id int64 `gorm:"column:id;primaryKey" json:"id"` TaskId string `gorm:"column:task_id" json:"task_id"` Type string `gorm:"column:type" json:"type"` Path string `gorm:"column:path" json:"path"` ImageWidth int `gorm:"column:image_width" json:"image_width"` ImageHeight int `gorm:"column:image_height" json:"image_height"` CreatedAt utils.CustomTime `gorm:"column:created_at" json:"created_at"` UpdatedAt utils.CustomTime `gorm:"column:updated_at" json:"updated_at"` } type FaceppMapBox struct { Id int64 `gorm:"column:id;primaryKey" json:"id"` MapId int64 `gorm:"column:map_id" json:"map_id"` Content string `gorm:"column:content" json:"content"` CreatedAt utils.CustomTime `gorm:"column:created_at" json:"created_at"` UpdatedAt utils.CustomTime `gorm:"column:updated_at" json:"updated_at"` } type FaceppMapBoxItem struct { Id int64 `json:"id"` Content interface{} `json:"content"` } type FaceppMapResource struct { Id int64 `json:"id"` Type string `json:"type"` TypeName string `json:"type_name"` TypeNameEn string `json:"type_name_en"` Path string `json:"path"` Boxes []FaceppMapBoxItem `json:"boxes"` ImageWidth int `json:"image_width"` ImageHeight int `json:"image_height"` }