// 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),
	}
}