This commit is contained in:
2026-01-07 08:43:14 +08:00
parent 09cbd721a0
commit e839da9398
21 changed files with 1953 additions and 159 deletions
+25 -24
View File
@@ -8,29 +8,30 @@ import (
// 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"`
Id int32 `orm:"pk;auto" 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"`
BusinessScope string `orm:"column(business_scope);type(longtext);null" json:"business_scope"`
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 {
@@ -39,4 +40,4 @@ func (t *Customer) TableName() string {
func init() {
orm.RegisterModel(new(Customer))
}
}
+2 -1
View File
@@ -8,7 +8,7 @@ import (
// Supplier 供应商模型(对应表 yz_tenant_crm_supplier
type Supplier struct {
Id int64 `orm:"pk;auto" json:"id"`
Id int32 `orm:"pk;auto" json:"id"`
TenantId string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
SupplierName string `orm:"column(supplier_name);size(100)" json:"supplier_name"`
SupplierType string `orm:"column(supplier_type);size(20)" json:"supplier_type"`
@@ -22,6 +22,7 @@ type Supplier struct {
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"`
BusinessScope string `orm:"column(business_scope);type(longtext);null" json:"business_scope"`
InvoiceTitle string `orm:"column(invoice_title);size(255);null" json:"invoice_title"`
TaxNumber string `orm:"column(tax_number);size(20);null" json:"tax_number"`
BankName string `orm:"column(bank_name);size(50);null" json:"bank_name"`