c4eede1114
CI / changes (push) Successful in 1m32s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 0s
CI / analysis (push) Successful in 3m45s
CI / bff (push) Successful in 31s
CI / chore (push) Successful in 0s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 1s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 0s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 1s
CI / product (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / record (push) Successful in 0s
CI / store (push) Successful in 0s
CI / support (push) Successful in 0s
CI / user (push) Successful in 1s
CI / task (push) Successful in 0s
CI / water (push) Successful in 0s
CI / wecom (push) Successful in 0s
CI / ws (push) Successful in 0s
65 lines
2.3 KiB
Go
65 lines
2.3 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" json:"id"`
|
|
TaskId string `gorm:"column:task_id" json:"task_id"`
|
|
ResultOssPath string `gorm:"column:result_oss_path" json:"result_oss_path"`
|
|
}
|
|
|
|
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"`
|
|
}
|