feat:完善信息

This commit is contained in:
henry
2021-09-29 16:25:56 +08:00
parent b876eab301
commit c556053feb
16 changed files with 382 additions and 84 deletions

View File

@ -51,6 +51,26 @@ func (m *Images) AnalysisSlice(domain string) []string {
return images
}
// AccountStatus 账号状态
type AccountStatus struct {
Status AccountStatusKind `gorm:"column:status;type:tinyint(1);default:1;comment:状态(1启用2禁用)" json:"-"`
}
// AccountStatusKind 状态
type AccountStatusKind int
const (
// AccountStatusForEnable 启用
AccountStatusForEnable AccountStatusKind = iota + 1
// AccountStatusForDisable 禁用
AccountStatusForDisable
)
// Format 格式化
func (m *AccountStatus) Format() string {
return utils.AnyToJSON(m)
}
// Position 坐标信息
type Position struct {
Longitude float64 `json:"longitude"` // 经度
@ -61,14 +81,3 @@ type Position struct {
func (m *Position) Format() string {
return utils.AnyToJSON(m)
}
// Tags 标签
type Tags struct {
Key string `json:"key"`
Value string `json:"value"`
}
// Format 格式化
func (m *Tags) Format() string {
return utils.AnyToJSON(m)
}