yunzer_go/server/models/contact.go
2025-11-13 17:24:59 +08:00

38 lines
1.7 KiB
Go
Raw 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.

package models
import (
"time"
"github.com/beego/beego/v2/client/orm"
)
// Contact 联系人模型(对应表 yz_tenant_crm_contact
type Contact struct {
Id int64 `orm:"pk;auto" json:"id"`
TenantId string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
RelatedType int `orm:"column(related_type)" json:"related_type"` // 1=客户 2=供应商
RelatedId string `orm:"column(related_id);size(64)" json:"related_id"`
ContactName string `orm:"column(contact_name);size(50)" json:"contact_name"`
Gender int8 `orm:"column(gender);null" json:"gender"`
Mobile string `orm:"column(mobile);size(20);null" json:"mobile"`
Phone string `orm:"column(phone);size(20);null" json:"phone"`
Email string `orm:"column(email);size(100);null" json:"email"`
Position string `orm:"column(position);size(50);null" json:"position"`
Department string `orm:"column(department);size(50);null" json:"department"`
IsPrimary int8 `orm:"column(is_primary);null" json:"is_primary"`
Remark string `orm:"column(remark);size(500);null" json:"remark"`
CreateTime time.Time `orm:"column(create_time);type(datetime);auto_now_add" json:"create_time"`
UpdateTime time.Time `orm:"column(update_time);type(datetime);auto_now" json:"update_time"`
CreateBy int64 `orm:"column(create_by);null" json:"create_by"`
UpdateBy int64 `orm:"column(update_by);null" json:"update_by"`
IsDeleted int8 `orm:"column(is_deleted);null" json:"is_deleted"`
}
func (t *Contact) TableName() string {
return "yz_tenant_crm_contact"
}
func init() {
orm.RegisterModel(new(Contact))
}