|
@@ -0,0 +1,122 @@
|
|
|
+package company_product
|
|
|
+
|
|
|
+import "time"
|
|
|
+
|
|
|
+
|
|
|
+type CompanyProduct struct {
|
|
|
+ CompanyProductID int `gorm:"primaryKey;column:company_product_id;type:int(11);not null" json:"-"`
|
|
|
+ CompanyID int `gorm:"uniqueIndex:idx_company_id_product_id;column:company_id;type:int(11);default:0" json:"companyId"`
|
|
|
+ ProductID int `gorm:"uniqueIndex:idx_company_id_product_id;column:product_id;type:int(11);default:0" json:"productId"`
|
|
|
+ ProductName string `gorm:"column:product_name;type:varchar(30);default:''" json:"productName"`
|
|
|
+ CompanyName string `gorm:"column:company_name;type:varchar(100);default:''" json:"companyName"`
|
|
|
+ Source string `gorm:"column:source;type:varchar(100);default:''" json:"source"`
|
|
|
+ Reasons string `gorm:"column:reasons;type:varchar(255);default:''" json:"reasons"`
|
|
|
+ Status string `gorm:"column:status;type:enum('试用','永续','冻结','流失','正式','潜在')" json:"status"`
|
|
|
+ IndustryID int `gorm:"column:industry_id;type:int(11)" json:"industryId"`
|
|
|
+ IndustryName string `gorm:"column:industry_name;type:varchar(50);default:''" json:"industryName"`
|
|
|
+ SellerID int `gorm:"column:seller_id;type:int(11);default:0" json:"sellerId"`
|
|
|
+ SellerName string `gorm:"column:seller_name;type:varchar(50);default:''" json:"sellerName"`
|
|
|
+ GroupID int `gorm:"column:group_id;type:int(11);default:0" json:"groupId"`
|
|
|
+ DepartmentID int `gorm:"column:department_id;type:int(11);default:0" json:"departmentId"`
|
|
|
+ IsSuspend int8 `gorm:"primaryKey;column:is_suspend;type:tinyint(4);not null;default:0" json:"-"`
|
|
|
+ SuspendTime time.Time `gorm:"column:suspend_time;type:datetime" json:"suspendTime"`
|
|
|
+ TryOutTime time.Time `gorm:"column:try_out_time;type:datetime" json:"tryOutTime"`
|
|
|
+ RenewalReason string `gorm:"column:renewal_reason;type:varchar(255);default:''" json:"renewalReason"`
|
|
|
+ FreezeTime time.Time `gorm:"column:freeze_time;type:datetime" json:"freezeTime"`
|
|
|
+ FreezeReason string `gorm:"column:freeze_reason;type:varchar(255);default:''" json:"freezeReason"`
|
|
|
+ Remark string `gorm:"column:remark;type:varchar(255);default:''" json:"remark"`
|
|
|
+ StartDate time.Time `gorm:"column:start_date;type:date" json:"startDate"`
|
|
|
+ EndDate time.Time `gorm:"column:end_date;type:date" json:"endDate"`
|
|
|
+ ContractEndDate time.Time `gorm:"index:idx_contract_end_date;column:contract_end_date;type:date" json:"contractEndDate"`
|
|
|
+ CreateTime time.Time `gorm:"column:create_time;type:datetime" json:"createTime"`
|
|
|
+ ModifyTime time.Time `gorm:"column:modify_time;type:datetime" json:"modifyTime"`
|
|
|
+ LoseReason string `gorm:"column:lose_reason;type:varchar(255);default:''" json:"loseReason"`
|
|
|
+ LossTime time.Time `gorm:"column:loss_time;type:datetime" json:"lossTime"`
|
|
|
+ ApproveStatus string `gorm:"column:approve_status;type:enum('待审批','已审批','驳回','已撤回')" json:"approveStatus"`
|
|
|
+ CompanyType string `gorm:"column:company_type;type:varchar(20);default:''" json:"companyType"`
|
|
|
+ FreezeStartDate time.Time `gorm:"column:freeze_start_date;type:date" json:"freezeStartDate"`
|
|
|
+ FreezeEndDate time.Time `gorm:"column:freeze_end_date;type:date" json:"freezeEndDate"`
|
|
|
+ CustomType int8 `gorm:"column:custom_type;type:tinyint(4);default:0" json:"customType"`
|
|
|
+ FormalTime time.Time `gorm:"column:formal_time;type:datetime" json:"formalTime"`
|
|
|
+ OpenCode string `gorm:"column:open_code;type:varchar(64);default:''" json:"openCode"`
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+func (m *CompanyProduct) TableName() string {
|
|
|
+ return "company_product"
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+var CompanyProductColumns = struct {
|
|
|
+ CompanyProductID string
|
|
|
+ CompanyID string
|
|
|
+ ProductID string
|
|
|
+ ProductName string
|
|
|
+ CompanyName string
|
|
|
+ Source string
|
|
|
+ Reasons string
|
|
|
+ Status string
|
|
|
+ IndustryID string
|
|
|
+ IndustryName string
|
|
|
+ SellerID string
|
|
|
+ SellerName string
|
|
|
+ GroupID string
|
|
|
+ DepartmentID string
|
|
|
+ IsSuspend string
|
|
|
+ SuspendTime string
|
|
|
+ TryOutTime string
|
|
|
+ RenewalReason string
|
|
|
+ FreezeTime string
|
|
|
+ FreezeReason string
|
|
|
+ Remark string
|
|
|
+ StartDate string
|
|
|
+ EndDate string
|
|
|
+ ContractEndDate string
|
|
|
+ CreateTime string
|
|
|
+ ModifyTime string
|
|
|
+ LoseReason string
|
|
|
+ LossTime string
|
|
|
+ ApproveStatus string
|
|
|
+ CompanyType string
|
|
|
+ FreezeStartDate string
|
|
|
+ FreezeEndDate string
|
|
|
+ CustomType string
|
|
|
+ FormalTime string
|
|
|
+ OpenCode string
|
|
|
+}{
|
|
|
+ CompanyProductID: "company_product_id",
|
|
|
+ CompanyID: "company_id",
|
|
|
+ ProductID: "product_id",
|
|
|
+ ProductName: "product_name",
|
|
|
+ CompanyName: "company_name",
|
|
|
+ Source: "source",
|
|
|
+ Reasons: "reasons",
|
|
|
+ Status: "status",
|
|
|
+ IndustryID: "industry_id",
|
|
|
+ IndustryName: "industry_name",
|
|
|
+ SellerID: "seller_id",
|
|
|
+ SellerName: "seller_name",
|
|
|
+ GroupID: "group_id",
|
|
|
+ DepartmentID: "department_id",
|
|
|
+ IsSuspend: "is_suspend",
|
|
|
+ SuspendTime: "suspend_time",
|
|
|
+ TryOutTime: "try_out_time",
|
|
|
+ RenewalReason: "renewal_reason",
|
|
|
+ FreezeTime: "freeze_time",
|
|
|
+ FreezeReason: "freeze_reason",
|
|
|
+ Remark: "remark",
|
|
|
+ StartDate: "start_date",
|
|
|
+ EndDate: "end_date",
|
|
|
+ ContractEndDate: "contract_end_date",
|
|
|
+ CreateTime: "create_time",
|
|
|
+ ModifyTime: "modify_time",
|
|
|
+ LoseReason: "lose_reason",
|
|
|
+ LossTime: "loss_time",
|
|
|
+ ApproveStatus: "approve_status",
|
|
|
+ CompanyType: "company_type",
|
|
|
+ FreezeStartDate: "freeze_start_date",
|
|
|
+ FreezeEndDate: "freeze_end_date",
|
|
|
+ CustomType: "custom_type",
|
|
|
+ FormalTime: "formal_time",
|
|
|
+ OpenCode: "open_code",
|
|
|
+}
|