You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package model
import (
"base/app/common"
"fmt"
"time"
)
const (
CustomerGenderKnow = 0 // 未知
CustomerGenderMale = 1 // 男
CustomerGenderFemale = 2 // 女
CustomerIsImportantTrue = 1 // 重要
CustomerIsImportantFalse = 2 // 不重要
CustomerLevelRegister = 1 // 注册用户
CustomerLevelBrowse = 2 // 浏览客户
CustomerLevelIntention = 3 // 意向客户
CustomerLevelDone = 4 // 成交客户
CustomerIsRealFalse = 0 // 未认证
CustomerIsRealTrue = 1 // 已认证
)
type Customer struct {
Id uint ` gorm:"primaryKey" `
OpenId string
UnionId string
HeadImg string // 头像
Nickname string // 昵称
Mobile string // 手机号
Gender uint // 性别 0: 未填写 1: 男 2: 女
BrokerId uint // 经纪人
Broker Broker ` gorm:"foreignKey:BrokerId" `
IsImportant uint // 是否重要 1=重要 2=不重要
Level uint // 客户等级 1=注册用户 2=浏览客户 3=意向客户 4=成交客户
TrailId uint // 最新轨迹id
Trail CustomerTrail ` gorm:"foreignKey:TrailId" `
IsReal uint // 实名认证 0=未认证 1=已认证
MasterId uint
Master CustomerMaster ` gorm:"foreignKey:MasterId" `
CreatedAt time . Time
UpdatedAt time . Time
}
// RandNickname @Title 随机昵称
func ( * Customer ) RandNickname ( ) string {
return fmt . Sprintf ( "云云问车%s" , common . RandStr ( 4 , "0123456789" ) )
}