package models

const (
	FacesVectorDistance = "(t2.v0-t1.v0)*(t2.v0-t1.v0) + (t2.v1-t1.v1)*(t2.v1-t1.v1) + (t2.v2-t1.v2)*(t2.v2-t1.v2) + (t2.v3-t1.v3)*(t2.v3-t1.v3) + (t2.v4-t1.v4)*(t2.v4-t1.v4) + (t2.v5-t1.v5)*(t2.v5-t1.v5) + (t2.v6-t1.v6)*(t2.v6-t1.v6) + (t2.v7-t1.v7)*(t2.v7-t1.v7) + (t2.v8-t1.v8)*(t2.v8-t1.v8) + (t2.v9-t1.v9)*(t2.v9-t1.v9) + (t2.v10-t1.v10)*(t2.v10-t1.v10) + (t2.v11-t1.v11)*(t2.v11-t1.v11) + (t2.v12-t1.v12)*(t2.v12-t1.v12) + (t2.v13-t1.v13)*(t2.v13-t1.v13) + (t2.v14-t1.v14)*(t2.v14-t1.v14) + (t2.v15-t1.v15)*(t2.v15-t1.v15) + (t2.v16-t1.v16)*(t2.v16-t1.v16) + (t2.v17-t1.v17)*(t2.v17-t1.v17) + (t2.v18-t1.v18)*(t2.v18-t1.v18) + (t2.v19-t1.v19)*(t2.v19-t1.v19) + (t2.v20-t1.v20)*(t2.v20-t1.v20) + (t2.v21-t1.v21)*(t2.v21-t1.v21) + (t2.v22-t1.v22)*(t2.v22-t1.v22) + (t2.v23-t1.v23)*(t2.v23-t1.v23) + (t2.v24-t1.v24)*(t2.v24-t1.v24) + (t2.v25-t1.v25)*(t2.v25-t1.v25) + (t2.v26-t1.v26)*(t2.v26-t1.v26) + (t2.v27-t1.v27)*(t2.v27-t1.v27) + (t2.v28-t1.v28)*(t2.v28-t1.v28) + (t2.v29-t1.v29)*(t2.v29-t1.v29) + (t2.v30-t1.v30)*(t2.v30-t1.v30) + (t2.v31-t1.v31)*(t2.v31-t1.v31) + (t2.v32-t1.v32)*(t2.v32-t1.v32) + (t2.v33-t1.v33)*(t2.v33-t1.v33) + (t2.v34-t1.v34)*(t2.v34-t1.v34) + (t2.v35-t1.v35)*(t2.v35-t1.v35) + (t2.v36-t1.v36)*(t2.v36-t1.v36) + (t2.v37-t1.v37)*(t2.v37-t1.v37) + (t2.v38-t1.v38)*(t2.v38-t1.v38) + (t2.v39-t1.v39)*(t2.v39-t1.v39) + (t2.v40-t1.v40)*(t2.v40-t1.v40) + (t2.v41-t1.v41)*(t2.v41-t1.v41) + (t2.v42-t1.v42)*(t2.v42-t1.v42) + (t2.v43-t1.v43)*(t2.v43-t1.v43) + (t2.v44-t1.v44)*(t2.v44-t1.v44) + (t2.v45-t1.v45)*(t2.v45-t1.v45) + (t2.v46-t1.v46)*(t2.v46-t1.v46) + (t2.v47-t1.v47)*(t2.v47-t1.v47) + (t2.v48-t1.v48)*(t2.v48-t1.v48) + (t2.v49-t1.v49)*(t2.v49-t1.v49) + (t2.v50-t1.v50)*(t2.v50-t1.v50) + (t2.v51-t1.v51)*(t2.v51-t1.v51) + (t2.v52-t1.v52)*(t2.v52-t1.v52) + (t2.v53-t1.v53)*(t2.v53-t1.v53) + (t2.v54-t1.v54)*(t2.v54-t1.v54) + (t2.v55-t1.v55)*(t2.v55-t1.v55) + (t2.v56-t1.v56)*(t2.v56-t1.v56) + (t2.v57-t1.v57)*(t2.v57-t1.v57) + (t2.v58-t1.v58)*(t2.v58-t1.v58) + (t2.v59-t1.v59)*(t2.v59-t1.v59) + (t2.v60-t1.v60)*(t2.v60-t1.v60) + (t2.v61-t1.v61)*(t2.v61-t1.v61) + (t2.v62-t1.v62)*(t2.v62-t1.v62) + (t2.v63-t1.v63)*(t2.v63-t1.v63) + (t2.v64-t1.v64)*(t2.v64-t1.v64) + (t2.v65-t1.v65)*(t2.v65-t1.v65) + (t2.v66-t1.v66)*(t2.v66-t1.v66) + (t2.v67-t1.v67)*(t2.v67-t1.v67) + (t2.v68-t1.v68)*(t2.v68-t1.v68) + (t2.v69-t1.v69)*(t2.v69-t1.v69) + (t2.v70-t1.v70)*(t2.v70-t1.v70) + (t2.v71-t1.v71)*(t2.v71-t1.v71) + (t2.v72-t1.v72)*(t2.v72-t1.v72) + (t2.v73-t1.v73)*(t2.v73-t1.v73) + (t2.v74-t1.v74)*(t2.v74-t1.v74) + (t2.v75-t1.v75)*(t2.v75-t1.v75) + (t2.v76-t1.v76)*(t2.v76-t1.v76) + (t2.v77-t1.v77)*(t2.v77-t1.v77) + (t2.v78-t1.v78)*(t2.v78-t1.v78) + (t2.v79-t1.v79)*(t2.v79-t1.v79) + (t2.v80-t1.v80)*(t2.v80-t1.v80) + (t2.v81-t1.v81)*(t2.v81-t1.v81) + (t2.v82-t1.v82)*(t2.v82-t1.v82) + (t2.v83-t1.v83)*(t2.v83-t1.v83) + (t2.v84-t1.v84)*(t2.v84-t1.v84) + (t2.v85-t1.v85)*(t2.v85-t1.v85) + (t2.v86-t1.v86)*(t2.v86-t1.v86) + (t2.v87-t1.v87)*(t2.v87-t1.v87) + (t2.v88-t1.v88)*(t2.v88-t1.v88) + (t2.v89-t1.v89)*(t2.v89-t1.v89) + (t2.v90-t1.v90)*(t2.v90-t1.v90) + (t2.v91-t1.v91)*(t2.v91-t1.v91) + (t2.v92-t1.v92)*(t2.v92-t1.v92) + (t2.v93-t1.v93)*(t2.v93-t1.v93) + (t2.v94-t1.v94)*(t2.v94-t1.v94) + (t2.v95-t1.v95)*(t2.v95-t1.v95) + (t2.v96-t1.v96)*(t2.v96-t1.v96) + (t2.v97-t1.v97)*(t2.v97-t1.v97) + (t2.v98-t1.v98)*(t2.v98-t1.v98) + (t2.v99-t1.v99)*(t2.v99-t1.v99) + (t2.v100-t1.v100)*(t2.v100-t1.v100) + (t2.v101-t1.v101)*(t2.v101-t1.v101) + (t2.v102-t1.v102)*(t2.v102-t1.v102) + (t2.v103-t1.v103)*(t2.v103-t1.v103) + (t2.v104-t1.v104)*(t2.v104-t1.v104) + (t2.v105-t1.v105)*(t2.v105-t1.v105) + (t2.v106-t1.v106)*(t2.v106-t1.v106) + (t2.v107-t1.v107)*(t2.v107-t1.v107) + (t2.v108-t1.v108)*(t2.v108-t1.v108) + (t2.v109-t1.v109)*(t2.v109-t1.v109) + (t2.v110-t1.v110)*(t2.v110-t1.v110) + (t2.v111-t1.v111)*(t2.v111-t1.v111) + (t2.v112-t1.v112)*(t2.v112-t1.v112) + (t2.v113-t1.v113)*(t2.v113-t1.v113) + (t2.v114-t1.v114)*(t2.v114-t1.v114) + (t2.v115-t1.v115)*(t2.v115-t1.v115) + (t2.v116-t1.v116)*(t2.v116-t1.v116) + (t2.v117-t1.v117)*(t2.v117-t1.v117) + (t2.v118-t1.v118)*(t2.v118-t1.v118) + (t2.v119-t1.v119)*(t2.v119-t1.v119) + (t2.v120-t1.v120)*(t2.v120-t1.v120) + (t2.v121-t1.v121)*(t2.v121-t1.v121) + (t2.v122-t1.v122)*(t2.v122-t1.v122) + (t2.v123-t1.v123)*(t2.v123-t1.v123) + (t2.v124-t1.v124)*(t2.v124-t1.v124) + (t2.v125-t1.v125)*(t2.v125-t1.v125) + (t2.v126-t1.v126)*(t2.v126-t1.v126) + (t2.v127-t1.v127)*(t2.v127-t1.v127)"
)

type Face struct {
	ID        uint64  `gorm:"primaryKey"`
	UserID    uint64  `gorm:"index:user_index,priority:1"`
	User      User    `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
	CreatedAt int64   `gorm:"index:user_index,priority:2"`
	AssetID   uint64  `gorm:"index:uniq_asset_face,unique;priority:1"`
	Asset     Asset   `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
	PersonID  *uint64 `gorm:""`
	Person    Person  `gorm:"constraint:OnUpdate:CASCADE,OnDelete:SET NULL;"`
	Distance  float64 `gorm:"type:double"`
	Num       int     `gorm:"index:uniq_asset_face,unique;"`
	X1        int     `gorm:"type:int"`
	Y1        int     `gorm:"type:int"`
	X2        int     `gorm:"type:int"`
	Y2        int     `gorm:"type:int"`
	V0        float32 `gorm:"type:double"`
	V1        float32 `gorm:"type:double"`
	V2        float32 `gorm:"type:double"`
	V3        float32 `gorm:"type:double"`
	V4        float32 `gorm:"type:double"`
	V5        float32 `gorm:"type:double"`
	V6        float32 `gorm:"type:double"`
	V7        float32 `gorm:"type:double"`
	V8        float32 `gorm:"type:double"`
	V9        float32 `gorm:"type:double"`
	V10       float32 `gorm:"type:double"`
	V11       float32 `gorm:"type:double"`
	V12       float32 `gorm:"type:double"`
	V13       float32 `gorm:"type:double"`
	V14       float32 `gorm:"type:double"`
	V15       float32 `gorm:"type:double"`
	V16       float32 `gorm:"type:double"`
	V17       float32 `gorm:"type:double"`
	V18       float32 `gorm:"type:double"`
	V19       float32 `gorm:"type:double"`
	V20       float32 `gorm:"type:double"`
	V21       float32 `gorm:"type:double"`
	V22       float32 `gorm:"type:double"`
	V23       float32 `gorm:"type:double"`
	V24       float32 `gorm:"type:double"`
	V25       float32 `gorm:"type:double"`
	V26       float32 `gorm:"type:double"`
	V27       float32 `gorm:"type:double"`
	V28       float32 `gorm:"type:double"`
	V29       float32 `gorm:"type:double"`
	V30       float32 `gorm:"type:double"`
	V31       float32 `gorm:"type:double"`
	V32       float32 `gorm:"type:double"`
	V33       float32 `gorm:"type:double"`
	V34       float32 `gorm:"type:double"`
	V35       float32 `gorm:"type:double"`
	V36       float32 `gorm:"type:double"`
	V37       float32 `gorm:"type:double"`
	V38       float32 `gorm:"type:double"`
	V39       float32 `gorm:"type:double"`
	V40       float32 `gorm:"type:double"`
	V41       float32 `gorm:"type:double"`
	V42       float32 `gorm:"type:double"`
	V43       float32 `gorm:"type:double"`
	V44       float32 `gorm:"type:double"`
	V45       float32 `gorm:"type:double"`
	V46       float32 `gorm:"type:double"`
	V47       float32 `gorm:"type:double"`
	V48       float32 `gorm:"type:double"`
	V49       float32 `gorm:"type:double"`
	V50       float32 `gorm:"type:double"`
	V51       float32 `gorm:"type:double"`
	V52       float32 `gorm:"type:double"`
	V53       float32 `gorm:"type:double"`
	V54       float32 `gorm:"type:double"`
	V55       float32 `gorm:"type:double"`
	V56       float32 `gorm:"type:double"`
	V57       float32 `gorm:"type:double"`
	V58       float32 `gorm:"type:double"`
	V59       float32 `gorm:"type:double"`
	V60       float32 `gorm:"type:double"`
	V61       float32 `gorm:"type:double"`
	V62       float32 `gorm:"type:double"`
	V63       float32 `gorm:"type:double"`
	V64       float32 `gorm:"type:double"`
	V65       float32 `gorm:"type:double"`
	V66       float32 `gorm:"type:double"`
	V67       float32 `gorm:"type:double"`
	V68       float32 `gorm:"type:double"`
	V69       float32 `gorm:"type:double"`
	V70       float32 `gorm:"type:double"`
	V71       float32 `gorm:"type:double"`
	V72       float32 `gorm:"type:double"`
	V73       float32 `gorm:"type:double"`
	V74       float32 `gorm:"type:double"`
	V75       float32 `gorm:"type:double"`
	V76       float32 `gorm:"type:double"`
	V77       float32 `gorm:"type:double"`
	V78       float32 `gorm:"type:double"`
	V79       float32 `gorm:"type:double"`
	V80       float32 `gorm:"type:double"`
	V81       float32 `gorm:"type:double"`
	V82       float32 `gorm:"type:double"`
	V83       float32 `gorm:"type:double"`
	V84       float32 `gorm:"type:double"`
	V85       float32 `gorm:"type:double"`
	V86       float32 `gorm:"type:double"`
	V87       float32 `gorm:"type:double"`
	V88       float32 `gorm:"type:double"`
	V89       float32 `gorm:"type:double"`
	V90       float32 `gorm:"type:double"`
	V91       float32 `gorm:"type:double"`
	V92       float32 `gorm:"type:double"`
	V93       float32 `gorm:"type:double"`
	V94       float32 `gorm:"type:double"`
	V95       float32 `gorm:"type:double"`
	V96       float32 `gorm:"type:double"`
	V97       float32 `gorm:"type:double"`
	V98       float32 `gorm:"type:double"`
	V99       float32 `gorm:"type:double"`
	V100      float32 `gorm:"type:double"`
	V101      float32 `gorm:"type:double"`
	V102      float32 `gorm:"type:double"`
	V103      float32 `gorm:"type:double"`
	V104      float32 `gorm:"type:double"`
	V105      float32 `gorm:"type:double"`
	V106      float32 `gorm:"type:double"`
	V107      float32 `gorm:"type:double"`
	V108      float32 `gorm:"type:double"`
	V109      float32 `gorm:"type:double"`
	V110      float32 `gorm:"type:double"`
	V111      float32 `gorm:"type:double"`
	V112      float32 `gorm:"type:double"`
	V113      float32 `gorm:"type:double"`
	V114      float32 `gorm:"type:double"`
	V115      float32 `gorm:"type:double"`
	V116      float32 `gorm:"type:double"`
	V117      float32 `gorm:"type:double"`
	V118      float32 `gorm:"type:double"`
	V119      float32 `gorm:"type:double"`
	V120      float32 `gorm:"type:double"`
	V121      float32 `gorm:"type:double"`
	V122      float32 `gorm:"type:double"`
	V123      float32 `gorm:"type:double"`
	V124      float32 `gorm:"type:double"`
	V125      float32 `gorm:"type:double"`
	V126      float32 `gorm:"type:double"`
	V127      float32 `gorm:"type:double"`
}
