42 lines
2.2 KiB
Go
42 lines
2.2 KiB
Go
package models
|
||
|
||
import (
|
||
"time"
|
||
|
||
"github.com/beego/beego/v2/client/orm"
|
||
)
|
||
|
||
// Customer 客户模型(对应表 yz_tenant_crm_customer)
|
||
type Customer struct {
|
||
Id string `orm:"pk;size(36)" json:"id"`
|
||
TenantId string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||
CustomerName string `orm:"column(customer_name);size(100)" json:"customer_name"`
|
||
CustomerType string `orm:"column(customer_type);size(20)" json:"customer_type"`
|
||
ContactPerson string `orm:"column(contact_person);size(50)" json:"contact_person"`
|
||
ContactPhone string `orm:"column(contact_phone);size(20)" json:"contact_phone"`
|
||
ContactEmail string `orm:"column(contact_email);size(100);null" json:"contact_email"`
|
||
CustomerLevel string `orm:"column(customer_level);size(20);null" json:"customer_level"`
|
||
Industry string `orm:"column(industry);size(50);null" json:"industry"`
|
||
Address string `orm:"column(address);size(255);null" json:"address"`
|
||
RegisterTime *time.Time `orm:"column(register_time);null;type(date)" json:"register_time"`
|
||
ExpireTime *time.Time `orm:"column(expire_time);null;type(date)" json:"expire_time"`
|
||
Status string `orm:"column(status);size(20)" json:"status"`
|
||
Remark string `orm:"column(remark);type(text);null" json:"remark"`
|
||
InvoiceTitle string `orm:"column(invoice_title);size(100);null" json:"invoice_title"`
|
||
TaxNumber string `orm:"column(tax_number);size(50);null" json:"tax_number"`
|
||
BankName string `orm:"column(bank_name);size(100);null" json:"bank_name"`
|
||
BankAccount string `orm:"column(bank_account);size(50);null" json:"bank_account"`
|
||
RegisteredAddress string `orm:"column(registered_address);size(255);null" json:"registered_address"`
|
||
RegisteredPhone string `orm:"column(registered_phone);size(50);null" json:"registered_phone"`
|
||
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"`
|
||
DeleteTime *time.Time `orm:"column(delete_time);null;type(datetime)" json:"delete_time"`
|
||
}
|
||
|
||
func (t *Customer) TableName() string {
|
||
return "yz_tenant_crm_customer"
|
||
}
|
||
|
||
func init() {
|
||
orm.RegisterModel(new(Customer))
|
||
} |