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.
46 lines
1.2 KiB
46 lines
1.2 KiB
package model
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
const (
|
|
ContractMasterTypeConsignment = 1 //寄卖合同
|
|
ContractMasterTypePurchase = 2 // 收购合同
|
|
ContractMasterTypeSale = 3 // 出售合同
|
|
|
|
ContractMasterKindPerson = 1 // 个人
|
|
ContractMasterKindCompany = 2 // 公司
|
|
)
|
|
|
|
type ContractMaster struct {
|
|
Id uint `gorm:"primaryKey"`
|
|
ContractType uint // 合同类型 1=寄卖合同 2= 收购合同 3=出售合同
|
|
ContractId uint // 合同id
|
|
Kind uint //身份类型 1=个人 2=公司
|
|
Name string // 姓名/公司名
|
|
LegalPerson string // 公司法人名
|
|
IdCard string // 身份证号/公司机构代码
|
|
Phone string // 手机号
|
|
Address string // 地址
|
|
BankCard string // 银行卡号
|
|
Bank string // 开户行
|
|
BankAccount string // 开户人
|
|
IdCardFront string // 身份证正面
|
|
IdCardBack string // 身份证反面
|
|
Photo string // 半身照
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time
|
|
}
|
|
|
|
func (*ContractMaster) GetKindName(kind uint) (result string) {
|
|
switch kind {
|
|
case ContractMasterKindPerson:
|
|
return "个人"
|
|
case ContractMasterKindCompany:
|
|
return "企业"
|
|
default:
|
|
return "未知"
|
|
}
|
|
}
|