ai_scheduler/internal/data/model/ai_advice_advicer_fn.gen.go

37 lines
844 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
package model
import (
"fmt"
"time"
)
type AiAdviceAdvicerEntity struct {
Name string `json:"name"` // 姓名
Birth string `json:"birth"` // 用户名称
Gender string `json:"gender"` // 1:男2
WorkingYears string `json:"working_years"` // 工作年限
}
func (a *AiAdviceAdvicer) Entity() *AiAdviceAdvicerEntity {
var (
gender string
)
switch a.Gender {
case 1:
gender = "男"
case 2:
gender = "女"
default:
gender = "未知"
}
return &AiAdviceAdvicerEntity{
Name: a.Name,
Birth: a.Birth.Format(time.DateOnly),
Gender: gender,
WorkingYears: fmt.Sprintf("%d年", a.WorkingYears),
}
}