42 lines
2.0 KiB
Go
42 lines
2.0 KiB
Go
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,omitempty"`
|
||
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"`
|
||
Phone1 string `orm:"column(phone1);size(20);null" json:"phone1"`
|
||
Phone2 string `orm:"column(phone2);size(20);null" json:"phone2"`
|
||
Phone3 string `orm:"column(phone3);size(20);null" json:"phone3"`
|
||
Qq string `orm:"column(qq);size(255);null" json:"qq"`
|
||
Wechat string `orm:"column(wechat);size(255);null" json:"wechat"`
|
||
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"`
|
||
HomeAddress string `orm:"column(home_address);size(65535);null" json:"home_address"`
|
||
Remark string `orm:"column(remark);size(65535);null" json:"remark"`
|
||
CreateTime time.Time `orm:"column(create_time);type(datetime);auto_now_add" json:"create_time,omitempty"`
|
||
UpdateTime time.Time `orm:"column(update_time);type(datetime);auto_now" json:"update_time,omitempty"`
|
||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time,omitempty"`
|
||
CreateBy int64 `orm:"column(create_by);null" json:"create_by"`
|
||
UpdateBy int64 `orm:"column(update_by);null" json:"update_by"`
|
||
}
|
||
|
||
func (t *Contact) TableName() string {
|
||
return "yz_tenant_crm_contact"
|
||
}
|
||
|
||
func init() {
|
||
orm.RegisterModel(new(Contact))
|
||
}
|