747ab25325
CI / changes (push) Successful in 1m31s
CI / ad (push) Successful in 26s
CI / admin (push) Successful in 17s
CI / analysis (push) Successful in 24s
CI / bff (push) Successful in 16s
CI / chore (push) Successful in 14s
CI / equipment (push) Successful in 15s
CI / express (push) Successful in 13s
CI / factory (push) Successful in 13s
CI / message (push) Successful in 10s
CI / order (push) Successful in 10s
CI / payment (push) Successful in 11s
CI / percutaneous (push) Successful in 11s
CI / product (push) Successful in 12s
CI / record (push) Successful in 12s
CI / sale (push) Successful in 11s
CI / store (push) Successful in 11s
CI / support (push) Successful in 11s
CI / task (push) Successful in 10s
CI / user (push) Successful in 18s
CI / water (push) Successful in 13s
CI / wecom (push) Successful in 13s
CI / ws (push) Successful in 6s
79 lines
3.5 KiB
Go
79 lines
3.5 KiB
Go
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"`
|
|
}
|