增加招投标模块
This commit is contained in:
@@ -97,6 +97,24 @@ func Init(_ string) {
|
||||
new(TenantCrmContract),
|
||||
new(TenantCrmPayback),
|
||||
new(TenantCrmPaybackRecord),
|
||||
// 招投标管理(docs/sql/create_crm_bidding.sql)
|
||||
new(TenantCrmBiddingTender),
|
||||
new(TenantCrmBiddingTenderFile),
|
||||
new(TenantCrmBiddingTenderAnnounce),
|
||||
new(TenantCrmBiddingTenderSupplier),
|
||||
new(TenantCrmBiddingTenderEvaluation),
|
||||
new(TenantCrmBiddingTenderResult),
|
||||
new(TenantCrmBiddingBid),
|
||||
new(TenantCrmBiddingBidFile),
|
||||
new(TenantCrmBiddingBidApproval),
|
||||
new(TenantCrmBiddingBidTask),
|
||||
new(TenantCrmBiddingBidTemplate),
|
||||
new(TenantCrmBiddingBidDocument),
|
||||
new(TenantCrmBiddingBidQualification),
|
||||
new(TenantCrmBiddingBidQuote),
|
||||
new(TenantCrmBiddingBidCompetitor),
|
||||
new(TenantCrmBiddingBidResult),
|
||||
new(TenantCrmBiddingBidExpense),
|
||||
// 平台更新通知(docs/sql/platform_upgrade.sql)
|
||||
new(PlatformUpgradeNotice),
|
||||
new(ErpAccountSet),
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// =============================================================
|
||||
// 投标方(我要投标):主表 + 文件 + 审批 + 任务(4 张)
|
||||
// =============================================================
|
||||
|
||||
// TenantCrmBiddingBid 投标项目主表: yz_backend_crm_bidding_bid
|
||||
//
|
||||
// 状态机:
|
||||
// 0草稿 -> 1立项审批中 -> 2投标中 -> 3已开标 -> (4中标 | 5落标) -> (6已转合同 | 7已归档)
|
||||
//
|
||||
// 来源关联:
|
||||
// - source_type: 0独立 1商机 2项目
|
||||
// - source_id: 来源ID(商机/项目)
|
||||
type TenantCrmBiddingBid struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
BidNo string `orm:"column(bid_no);size(50)" json:"bid_no"` // 投标编号
|
||||
Title string `orm:"column(title);size(200)" json:"title"` // 投标标题
|
||||
BidType string `orm:"column(bid_type);size(20);default(1)" json:"bid_type"`
|
||||
Status int8 `orm:"column(status);default(0)" json:"status"` // 状态
|
||||
SourceType int8 `orm:"column(source_type);default(0)" json:"source_type"`
|
||||
SourceID *uint64 `orm:"column(source_id);null" json:"source_id"`
|
||||
BusinessID *uint64 `orm:"column(business_id);null" json:"business_id"` // 关联商机
|
||||
BusinessName string `orm:"column(business_name);size(200)" json:"business_name"`
|
||||
ProjectID *uint64 `orm:"column(project_id);null" json:"project_id"` // 关联项目(中转)
|
||||
ProjectName string `orm:"column(project_name);size(200)" json:"project_name"`
|
||||
TenderID *uint64 `orm:"column(tender_id);null" json:"tender_id"` // 关联招标项目
|
||||
TenderNo string `orm:"column(tender_no);size(50)" json:"tender_no"`
|
||||
CustomerID *uint64 `orm:"column(customer_id);null" json:"customer_id"` // 招标方
|
||||
CustomerName string `orm:"column(customer_name);size(200)" json:"customer_name"`
|
||||
PublishOrg string `orm:"column(publish_org);size(200)" json:"publish_org"`
|
||||
BidAmount float64 `orm:"column(bid_amount);digits(14);decimals(2);default(0)" json:"bid_amount"`
|
||||
BidDeposit float64 `orm:"column(bid_deposit);digits(14);decimals(2);default(0)" json:"bid_deposit"`
|
||||
PublishDate *time.Time `orm:"column(publish_date);type(date);null" json:"publish_date"`
|
||||
RegisterEndDate *time.Time `orm:"column(register_end_date);type(datetime);null" json:"register_end_date"`
|
||||
BidEndDate *time.Time `orm:"column(bid_end_date);type(datetime);null" json:"bid_end_date"`
|
||||
OpenBidDate *time.Time `orm:"column(open_bid_date);type(datetime);null" json:"open_bid_date"`
|
||||
ContactPerson string `orm:"column(contact_person);size(50)" json:"contact_person"`
|
||||
ContactPhone string `orm:"column(contact_phone);size(20)" json:"contact_phone"`
|
||||
BidAddress string `orm:"column(bid_address);size(255)" json:"bid_address"`
|
||||
OpenAddress string `orm:"column(open_address);size(255)" json:"open_address"`
|
||||
WinStatus int8 `orm:"column(win_status);default(0)" json:"win_status"` // 0未开标 1中标 2未中标 3废标 4流标
|
||||
WinDate *time.Time `orm:"column(win_date);type(datetime);null" json:"win_date"`
|
||||
OurRanking uint32 `orm:"column(our_ranking);default(0)" json:"our_ranking"`
|
||||
TotalScore float64 `orm:"column(total_score);digits(6);decimals(2);default(0)" json:"total_score"`
|
||||
CompetitorCount uint32 `orm:"column(competitor_count);default(0)" json:"competitor_count"`
|
||||
ContractID *uint64 `orm:"column(contract_id);null" json:"contract_id"` // 转合同ID
|
||||
NewProjectID *uint64 `orm:"column(new_project_id);null" json:"new_project_id"` // 中标后新建项目ID
|
||||
OwnerUserID string `orm:"column(owner_user_id);size(64)" json:"owner_user_id"`
|
||||
OwnerUserName string `orm:"column(owner_user_name);size(128)" json:"owner_user_name"`
|
||||
DepartmentID uint64 `orm:"column(department_id);default(0)" json:"department_id"`
|
||||
Description string `orm:"column(description);type(text);null" json:"description"`
|
||||
Remark string `orm:"column(remark);type(text);null" json:"remark"`
|
||||
Locked int8 `orm:"column(locked);default(0)" json:"locked"`
|
||||
CreateUserID string `orm:"column(create_user_id);size(64)" json:"create_user_id"`
|
||||
CreateUserName string `orm:"column(create_user_name);size(128)" json:"create_user_name"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingBid) TableName() string {
|
||||
return "yz_backend_crm_bidding_bid"
|
||||
}
|
||||
|
||||
// TenantCrmBiddingBidFile 投标文件: yz_backend_crm_bidding_bid_file
|
||||
type TenantCrmBiddingBidFile struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
BidID uint64 `orm:"column(bid_id);default(0)" json:"bid_id"`
|
||||
FileType string `orm:"column(file_type);size(20);default(1)" json:"file_type"`
|
||||
FileName string `orm:"column(file_name);size(255)" json:"file_name"`
|
||||
FileURL string `orm:"column(file_url);size(500)" json:"file_url"`
|
||||
FileSize uint64 `orm:"column(file_size);default(0)" json:"file_size"`
|
||||
FileExt string `orm:"column(file_ext);size(20)" json:"file_ext"`
|
||||
Version string `orm:"column(version);size(20);default(1.0)" json:"version"`
|
||||
UploadUserID string `orm:"column(upload_user_id);size(64)" json:"upload_user_id"`
|
||||
UploadUserName string `orm:"column(upload_user_name);size(128)" json:"upload_user_name"`
|
||||
Remark string `orm:"column(remark);size(500)" json:"remark"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingBidFile) TableName() string {
|
||||
return "yz_backend_crm_bidding_bid_file"
|
||||
}
|
||||
|
||||
// TenantCrmBiddingBidApproval 投标立项审批: yz_backend_crm_bidding_bid_approval
|
||||
type TenantCrmBiddingBidApproval struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
BidID uint64 `orm:"column(bid_id);default(0)" json:"bid_id"`
|
||||
ApprovalType string `orm:"column(approval_type);size(20);default(1)" json:"approval_type"`
|
||||
ApprovalStatus int8 `orm:"column(approval_status);default(0)" json:"approval_status"`
|
||||
ApprovalFlowID *uint64 `orm:"column(approval_flow_id);null" json:"approval_flow_id"`
|
||||
CurrentUserID string `orm:"column(current_user_id);size(64)" json:"current_user_id"`
|
||||
CurrentUserName string `orm:"column(current_user_name);size(128)" json:"current_user_name"`
|
||||
ApprovalUsers string `orm:"column(approval_users);type(text);null" json:"approval_users"`
|
||||
SubmitUserID string `orm:"column(submit_user_id);size(64)" json:"submit_user_id"`
|
||||
SubmitUserName string `orm:"column(submit_user_name);size(128)" json:"submit_user_name"`
|
||||
SubmitTime *time.Time `orm:"column(submit_time);type(datetime);null" json:"submit_time"`
|
||||
CompleteTime *time.Time `orm:"column(complete_time);type(datetime);null" json:"complete_time"`
|
||||
Comment string `orm:"column(comment);type(text);null" json:"comment"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingBidApproval) TableName() string {
|
||||
return "yz_backend_crm_bidding_bid_approval"
|
||||
}
|
||||
|
||||
// TenantCrmBiddingBidTask 投标任务: yz_backend_crm_bidding_bid_task
|
||||
type TenantCrmBiddingBidTask struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
BidID uint64 `orm:"column(bid_id);default(0)" json:"bid_id"`
|
||||
TaskName string `orm:"column(task_name);size(100)" json:"task_name"`
|
||||
TaskType string `orm:"column(task_type);size(20);default(1)" json:"task_type"`
|
||||
Content string `orm:"column(content);type(text);null" json:"content"`
|
||||
OwnerUserID string `orm:"column(owner_user_id);size(64)" json:"owner_user_id"`
|
||||
OwnerUserName string `orm:"column(owner_user_name);size(128)" json:"owner_user_name"`
|
||||
StartDate *time.Time `orm:"column(start_date);type(date);null" json:"start_date"`
|
||||
EndDate *time.Time `orm:"column(end_date);type(date);null" json:"end_date"`
|
||||
CompleteTime *time.Time `orm:"column(complete_time);type(datetime);null" json:"complete_time"`
|
||||
Status int8 `orm:"column(status);default(0)" json:"status"`
|
||||
Progress int8 `orm:"column(progress);default(0)" json:"progress"`
|
||||
Files string `orm:"column(files);type(text);null" json:"files"`
|
||||
Remark string `orm:"column(remark);size(500)" json:"remark"`
|
||||
CreateUserID string `orm:"column(create_user_id);size(64)" json:"create_user_id"`
|
||||
CreateUserName string `orm:"column(create_user_name);size(128)" json:"create_user_name"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingBidTask) TableName() string {
|
||||
return "yz_backend_crm_bidding_bid_task"
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// =============================================================
|
||||
// 投标方 - 公共库:模板 + 标书版本 + 资质文件 + 报价(4 张)
|
||||
// =============================================================
|
||||
|
||||
// TenantCrmBiddingBidTemplate 标书模板: yz_backend_crm_bidding_bid_template
|
||||
type TenantCrmBiddingBidTemplate struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
TemplateName string `orm:"column(template_name);size(100)" json:"template_name"`
|
||||
TemplateType string `orm:"column(template_type);size(20);default(1)" json:"template_type"` // 1技术标 2商务标 3综合标
|
||||
Industry string `orm:"column(industry);size(50)" json:"industry"`
|
||||
Description string `orm:"column(description);size(500)" json:"description"`
|
||||
Content string `orm:"column(content);type(longtext);null" json:"content"`
|
||||
FileURL string `orm:"column(file_url);size(500)" json:"file_url"`
|
||||
UseCount uint32 `orm:"column(use_count);default(0)" json:"use_count"`
|
||||
Status int8 `orm:"column(status);default(1)" json:"status"` // 1启用 0禁用
|
||||
OwnerUserID string `orm:"column(owner_user_id);size(64)" json:"owner_user_id"`
|
||||
OwnerUserName string `orm:"column(owner_user_name);size(128)" json:"owner_user_name"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingBidTemplate) TableName() string {
|
||||
return "yz_backend_crm_bidding_bid_template"
|
||||
}
|
||||
|
||||
// TenantCrmBiddingBidDocument 标书版本: yz_backend_crm_bidding_bid_document
|
||||
type TenantCrmBiddingBidDocument struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
BidID uint64 `orm:"column(bid_id);default(0)" json:"bid_id"`
|
||||
TemplateID *uint64 `orm:"column(template_id);null" json:"template_id"`
|
||||
Version string `orm:"column(version);size(20);default(v1.0)" json:"version"`
|
||||
Title string `orm:"column(title);size(200)" json:"title"`
|
||||
Content string `orm:"column(content);type(longtext);null" json:"content"`
|
||||
FileURL string `orm:"column(file_url);size(500)" json:"file_url"`
|
||||
Status int8 `orm:"column(status);default(1)" json:"status"` // 1编辑中 2待审核 3已定稿 4已提交
|
||||
EditorUserID string `orm:"column(editor_user_id);size(64)" json:"editor_user_id"`
|
||||
EditorUserName string `orm:"column(editor_user_name);size(128)" json:"editor_user_name"`
|
||||
ReviewUserID string `orm:"column(review_user_id);size(64)" json:"review_user_id"`
|
||||
ReviewUserName string `orm:"column(review_user_name);size(128)" json:"review_user_name"`
|
||||
ReviewComment string `orm:"column(review_comment);type(text);null" json:"review_comment"`
|
||||
ReviewTime *time.Time `orm:"column(review_time);type(datetime);null" json:"review_time"`
|
||||
SubmitTime *time.Time `orm:"column(submit_time);type(datetime);null" json:"submit_time"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingBidDocument) TableName() string {
|
||||
return "yz_backend_crm_bidding_bid_document"
|
||||
}
|
||||
|
||||
// TenantCrmBiddingBidQualification 资质文件库: yz_backend_crm_bidding_bid_qualification
|
||||
type TenantCrmBiddingBidQualification struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
QualificationName string `orm:"column(qualification_name);size(100)" json:"qualification_name"`
|
||||
QualificationType string `orm:"column(qualification_type);size(20);default(1)" json:"qualification_type"`
|
||||
QualificationNo string `orm:"column(qualification_no);size(100)" json:"qualification_no"`
|
||||
IssuingAuthority string `orm:"column(issuing_authority);size(200)" json:"issuing_authority"`
|
||||
IssueDate *time.Time `orm:"column(issue_date);type(date);null" json:"issue_date"`
|
||||
ExpireDate *time.Time `orm:"column(expire_date);type(date);null" json:"expire_date"`
|
||||
AlertDays uint32 `orm:"column(alert_days);default(30)" json:"alert_days"`
|
||||
FileURL string `orm:"column(file_url);size(500)" json:"file_url"`
|
||||
FileName string `orm:"column(file_name);size(255)" json:"file_name"`
|
||||
FileSize uint64 `orm:"column(file_size);default(0)" json:"file_size"`
|
||||
Description string `orm:"column(description);type(text);null" json:"description"`
|
||||
Status int8 `orm:"column(status);default(1)" json:"status"` // 1有效 2即将过期 0失效
|
||||
OwnerUserID string `orm:"column(owner_user_id);size(64)" json:"owner_user_id"`
|
||||
OwnerUserName string `orm:"column(owner_user_name);size(128)" json:"owner_user_name"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingBidQualification) TableName() string {
|
||||
return "yz_backend_crm_bidding_bid_qualification"
|
||||
}
|
||||
|
||||
// TenantCrmBiddingBidQuote 报价表: yz_backend_crm_bidding_bid_quote
|
||||
type TenantCrmBiddingBidQuote struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
BidID uint64 `orm:"column(bid_id);default(0)" json:"bid_id"`
|
||||
QuoteName string `orm:"column(quote_name);size(100)" json:"quote_name"`
|
||||
TotalAmount float64 `orm:"column(total_amount);digits(14);decimals(2);default(0)" json:"total_amount"`
|
||||
Currency string `orm:"column(currency);size(10);default(CNY)" json:"currency"`
|
||||
TaxRate float64 `orm:"column(tax_rate);digits(6);decimals(4);default(0)" json:"tax_rate"`
|
||||
ValidDate *time.Time `orm:"column(valid_date);type(date);null" json:"valid_date"`
|
||||
Products string `orm:"column(products);type(longtext);null" json:"products"` // 产品清单JSON
|
||||
CostAnalysis string `orm:"column(cost_analysis);type(text);null" json:"cost_analysis"`
|
||||
ProfitRate float64 `orm:"column(profit_rate);digits(6);decimals(2);default(0)" json:"profit_rate"`
|
||||
Status int8 `orm:"column(status);default(1)" json:"status"`
|
||||
ApprovalFlowID *uint64 `orm:"column(approval_flow_id);null" json:"approval_flow_id"`
|
||||
SubmitUserID string `orm:"column(submit_user_id);size(64)" json:"submit_user_id"`
|
||||
SubmitUserName string `orm:"column(submit_user_name);size(128)" json:"submit_user_name"`
|
||||
SubmitTime *time.Time `orm:"column(submit_time);type(datetime);null" json:"submit_time"`
|
||||
ApprovalTime *time.Time `orm:"column(approval_time);type(datetime);null" json:"approval_time"`
|
||||
Remark string `orm:"column(remark);type(text);null" json:"remark"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingBidQuote) TableName() string {
|
||||
return "yz_backend_crm_bidding_bid_quote"
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// =============================================================
|
||||
// 投标方 - 杂项:竞争对手 + 投标结果 + 投标费用(3 张)
|
||||
// =============================================================
|
||||
|
||||
// TenantCrmBiddingBidCompetitor 竞争对手报价: yz_backend_crm_bidding_bid_competitor
|
||||
type TenantCrmBiddingBidCompetitor struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
BidID uint64 `orm:"column(bid_id);default(0)" json:"bid_id"`
|
||||
CompetitorName string `orm:"column(competitor_name);size(200)" json:"competitor_name"`
|
||||
CompetitorType int8 `orm:"column(competitor_type);default(1)" json:"competitor_type"` // 1同类厂商 2关联企业 3其他
|
||||
QuoteAmount float64 `orm:"column(quote_amount);digits(14);decimals(2);default(0)" json:"quote_amount"`
|
||||
Advantages string `orm:"column(advantages);type(text);null" json:"advantages"`
|
||||
Weaknesses string `orm:"column(weaknesses);type(text);null" json:"weaknesses"`
|
||||
Source string `orm:"column(source);size(200)" json:"source"`
|
||||
Remark string `orm:"column(remark);size(500)" json:"remark"`
|
||||
CreateUserID string `orm:"column(create_user_id);size(64)" json:"create_user_id"`
|
||||
CreateUserName string `orm:"column(create_user_name);size(128)" json:"create_user_name"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingBidCompetitor) TableName() string {
|
||||
return "yz_backend_crm_bidding_bid_competitor"
|
||||
}
|
||||
|
||||
// TenantCrmBiddingBidResult 投标结果: yz_backend_crm_bidding_bid_result
|
||||
type TenantCrmBiddingBidResult struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
BidID uint64 `orm:"column(bid_id);default(0)" json:"bid_id"`
|
||||
ResultType int8 `orm:"column(result_type);default(0)" json:"result_type"` // 1中标 2未中标 3废标 4流标
|
||||
AnnounceDate *time.Time `orm:"column(announce_date);type(datetime);null" json:"announce_date"`
|
||||
AnnounceURL string `orm:"column(announce_url);size(500)" json:"announce_url"`
|
||||
TotalScore float64 `orm:"column(total_score);digits(6);decimals(2);default(0)" json:"total_score"`
|
||||
OurRanking uint32 `orm:"column(our_ranking);default(0)" json:"our_ranking"`
|
||||
CompetitorCount uint32 `orm:"column(competitor_count);default(0)" json:"competitor_count"`
|
||||
Reason string `orm:"column(reason);type(text);null" json:"reason"`
|
||||
Lessons string `orm:"column(lessons);type(text);null" json:"lessons"`
|
||||
NextStep string `orm:"column(next_step);size(255)" json:"next_step"`
|
||||
CreateUserID string `orm:"column(create_user_id);size(64)" json:"create_user_id"`
|
||||
CreateUserName string `orm:"column(create_user_name);size(128)" json:"create_user_name"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingBidResult) TableName() string {
|
||||
return "yz_backend_crm_bidding_bid_result"
|
||||
}
|
||||
|
||||
// TenantCrmBiddingBidExpense 投标费用: yz_backend_crm_bidding_bid_expense
|
||||
type TenantCrmBiddingBidExpense struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
BidID uint64 `orm:"column(bid_id);default(0)" json:"bid_id"`
|
||||
ExpenseType int8 `orm:"column(expense_type);default(1)" json:"expense_type"` // 1标书费 2保证金 3差旅费 4咨询费 5代理费 6其他
|
||||
ExpenseName string `orm:"column(expense_name);size(100)" json:"expense_name"`
|
||||
Amount float64 `orm:"column(amount);digits(12);decimals(2);default(0)" json:"amount"`
|
||||
Currency string `orm:"column(currency);size(10);default(CNY)" json:"currency"`
|
||||
PaymentStatus int8 `orm:"column(payment_status);default(0)" json:"payment_status"` // 0未付 1已付 2已退还 3已抵扣
|
||||
PaymentDate *time.Time `orm:"column(payment_date);type(datetime);null" json:"payment_date"`
|
||||
PaymentUserID string `orm:"column(payment_user_id);size(64)" json:"payment_user_id"`
|
||||
PaymentUserName string `orm:"column(payment_user_name);size(128)" json:"payment_user_name"`
|
||||
VoucherURL string `orm:"column(voucher_url);size(500)" json:"voucher_url"`
|
||||
Description string `orm:"column(description);type(text);null" json:"description"`
|
||||
CreateUserID string `orm:"column(create_user_id);size(64)" json:"create_user_id"`
|
||||
CreateUserName string `orm:"column(create_user_name);size(128)" json:"create_user_name"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingBidExpense) TableName() string {
|
||||
return "yz_backend_crm_bidding_bid_expense"
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// =============================================================
|
||||
// 招标方(我要招标):6 张表
|
||||
// =============================================================
|
||||
|
||||
// TenantCrmBiddingTender 招标项目主表: yz_backend_crm_bidding_tender
|
||||
//
|
||||
// 状态机:
|
||||
// 0草稿 -> 1公告中 -> 2报名中 -> 3投标中 -> 4开标中 -> 5评标中 -> 6已定标 -> 7已归档
|
||||
type TenantCrmBiddingTender struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
TenderNo string `orm:"column(tender_no);size(50)" json:"tender_no"` // 招标编号
|
||||
Title string `orm:"column(title);size(200)" json:"title"` // 招标标题
|
||||
TenderType string `orm:"column(tender_type);size(20);default(1)" json:"tender_type"` // 招标类型
|
||||
Status int8 `orm:"column(status);default(0)" json:"status"` // 状态
|
||||
CustomerID *uint64 `orm:"column(customer_id);null" json:"customer_id"` // 招标方客户ID
|
||||
CustomerName string `orm:"column(customer_name);size(200)" json:"customer_name"`
|
||||
PublishOrg string `orm:"column(publish_org);size(200)" json:"publish_org"`
|
||||
BudgetAmount float64 `orm:"column(budget_amount);digits(14);decimals(2);default(0)" json:"budget_amount"`
|
||||
BidDeposit float64 `orm:"column(bid_deposit);digits(14);decimals(2);default(0)" json:"bid_deposit"`
|
||||
PublishDate *time.Time `orm:"column(publish_date);type(date);null" json:"publish_date"`
|
||||
RegisterStartDate *time.Time `orm:"column(register_start_date);type(datetime);null" json:"register_start_date"`
|
||||
RegisterEndDate *time.Time `orm:"column(register_end_date);type(datetime);null" json:"register_end_date"`
|
||||
BidStartDate *time.Time `orm:"column(bid_start_date);type(datetime);null" json:"bid_start_date"`
|
||||
BidEndDate *time.Time `orm:"column(bid_end_date);type(datetime);null" json:"bid_end_date"`
|
||||
OpenBidDate *time.Time `orm:"column(open_bid_date);type(datetime);null" json:"open_bid_date"`
|
||||
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)" json:"contact_email"`
|
||||
BidAddress string `orm:"column(bid_address);size(255)" json:"bid_address"`
|
||||
OpenAddress string `orm:"column(open_address);size(255)" json:"open_address"`
|
||||
Description string `orm:"column(description);type(text);null" json:"description"`
|
||||
Requirement string `orm:"column(requirement);type(text);null" json:"requirement"`
|
||||
EvaluationMethod string `orm:"column(evaluation_method);size(50);default(1)" json:"evaluation_method"`
|
||||
WinnerSupplierID *uint64 `orm:"column(winner_supplier_id);null" json:"winner_supplier_id"`
|
||||
WinnerSupplierName string `orm:"column(winner_supplier_name);size(200)" json:"winner_supplier_name"`
|
||||
WinnerAmount float64 `orm:"column(winner_amount);digits(14);decimals(2);default(0)" json:"winner_amount"`
|
||||
WinnerDate *time.Time `orm:"column(winner_date);type(datetime);null" json:"winner_date"`
|
||||
ContractID *uint64 `orm:"column(contract_id);null" json:"contract_id"` // 转合同ID
|
||||
ProjectID *uint64 `orm:"column(project_id);null" json:"project_id"` // 关联项目ID
|
||||
OwnerUserID string `orm:"column(owner_user_id);size(64)" json:"owner_user_id"`
|
||||
OwnerUserName string `orm:"column(owner_user_name);size(128)" json:"owner_user_name"`
|
||||
DepartmentID uint64 `orm:"column(department_id);default(0)" json:"department_id"`
|
||||
Locked int8 `orm:"column(locked);default(0)" json:"locked"`
|
||||
Remark string `orm:"column(remark);type(text);null" json:"remark"`
|
||||
CreateUserID string `orm:"column(create_user_id);size(64)" json:"create_user_id"`
|
||||
CreateUserName string `orm:"column(create_user_name);size(128)" json:"create_user_name"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingTender) TableName() string {
|
||||
return "yz_backend_crm_bidding_tender"
|
||||
}
|
||||
|
||||
// TenantCrmBiddingTenderFile 招标文件: yz_backend_crm_bidding_tender_file
|
||||
type TenantCrmBiddingTenderFile struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
TenderID uint64 `orm:"column(tender_id);default(0)" json:"tender_id"`
|
||||
FileType string `orm:"column(file_type);size(20);default(1)" json:"file_type"`
|
||||
FileName string `orm:"column(file_name);size(255)" json:"file_name"`
|
||||
FileURL string `orm:"column(file_url);size(500)" json:"file_url"`
|
||||
FileSize uint64 `orm:"column(file_size);default(0)" json:"file_size"`
|
||||
FileExt string `orm:"column(file_ext);size(20)" json:"file_ext"`
|
||||
UploadUserID string `orm:"column(upload_user_id);size(64)" json:"upload_user_id"`
|
||||
UploadUserName string `orm:"column(upload_user_name);size(128)" json:"upload_user_name"`
|
||||
Remark string `orm:"column(remark);size(500)" json:"remark"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingTenderFile) TableName() string {
|
||||
return "yz_backend_crm_bidding_tender_file"
|
||||
}
|
||||
|
||||
// TenantCrmBiddingTenderAnnounce 招标公告: yz_backend_crm_bidding_tender_announce
|
||||
type TenantCrmBiddingTenderAnnounce struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
TenderID uint64 `orm:"column(tender_id);default(0)" json:"tender_id"`
|
||||
AnnounceType string `orm:"column(announce_type);size(20);default(1)" json:"announce_type"`
|
||||
Title string `orm:"column(title);size(255)" json:"title"`
|
||||
Content string `orm:"column(content);type(longtext);null" json:"content"`
|
||||
PublishStatus int8 `orm:"column(publish_status);default(0)" json:"publish_status"`
|
||||
PublishTime *time.Time `orm:"column(publish_time);type(datetime);null" json:"publish_time"`
|
||||
ViewCount uint32 `orm:"column(view_count);default(0)" json:"view_count"`
|
||||
CreateUserID string `orm:"column(create_user_id);size(64)" json:"create_user_id"`
|
||||
CreateUserName string `orm:"column(create_user_name);size(128)" json:"create_user_name"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingTenderAnnounce) TableName() string {
|
||||
return "yz_backend_crm_bidding_tender_announce"
|
||||
}
|
||||
|
||||
// TenantCrmBiddingTenderSupplier 投标方/供应商: yz_backend_crm_bidding_tender_supplier
|
||||
type TenantCrmBiddingTenderSupplier struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
TenderID uint64 `orm:"column(tender_id);default(0)" json:"tender_id"`
|
||||
SupplierID *uint64 `orm:"column(supplier_id);null" json:"supplier_id"`
|
||||
SupplierName string `orm:"column(supplier_name);size(200)" json:"supplier_name"`
|
||||
RegisterStatus int8 `orm:"column(register_status);default(1)" json:"register_status"`
|
||||
RegisterTime *time.Time `orm:"column(register_time);type(datetime);null" json:"register_time"`
|
||||
BidAmount float64 `orm:"column(bid_amount);digits(14);decimals(2);default(0)" json:"bid_amount"`
|
||||
BidFiles string `orm:"column(bid_files);type(text);null" json:"bid_files"`
|
||||
ContactPerson string `orm:"column(contact_person);size(50)" json:"contact_person"`
|
||||
ContactPhone string `orm:"column(contact_phone);size(20)" json:"contact_phone"`
|
||||
IsWinner int8 `orm:"column(is_winner);default(0)" json:"is_winner"`
|
||||
Ranking uint32 `orm:"column(ranking);default(0)" json:"ranking"`
|
||||
Remark string `orm:"column(remark);size(500)" json:"remark"`
|
||||
CreateUserID string `orm:"column(create_user_id);size(64)" json:"create_user_id"`
|
||||
CreateUserName string `orm:"column(create_user_name);size(128)" json:"create_user_name"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingTenderSupplier) TableName() string {
|
||||
return "yz_backend_crm_bidding_tender_supplier"
|
||||
}
|
||||
|
||||
// TenantCrmBiddingTenderEvaluation 开标评标: yz_backend_crm_bidding_tender_evaluation
|
||||
type TenantCrmBiddingTenderEvaluation struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
TenderID uint64 `orm:"column(tender_id);default(0)" json:"tender_id"`
|
||||
SupplierID *uint64 `orm:"column(supplier_id);null" json:"supplier_id"`
|
||||
SupplierName string `orm:"column(supplier_name);size(200)" json:"supplier_name"`
|
||||
TechnicalScore float64 `orm:"column(technical_score);digits(6);decimals(2);default(0)" json:"technical_score"`
|
||||
BusinessScore float64 `orm:"column(business_score);digits(6);decimals(2);default(0)" json:"business_score"`
|
||||
PriceScore float64 `orm:"column(price_score);digits(6);decimals(2);default(0)" json:"price_score"`
|
||||
ServiceScore float64 `orm:"column(service_score);digits(6);decimals(2);default(0)" json:"service_score"`
|
||||
TotalScore float64 `orm:"column(total_score);digits(6);decimals(2);default(0)" json:"total_score"`
|
||||
WeightConfig string `orm:"column(weight_config);size(255)" json:"weight_config"`
|
||||
Ranking uint32 `orm:"column(ranking);default(0)" json:"ranking"`
|
||||
EvaluationUserID string `orm:"column(evaluation_user_id);size(64)" json:"evaluation_user_id"`
|
||||
EvaluationUserName string `orm:"column(evaluation_user_name);size(128)" json:"evaluation_user_name"`
|
||||
EvaluationTime *time.Time `orm:"column(evaluation_time);type(datetime);null" json:"evaluation_time"`
|
||||
Comment string `orm:"column(comment);type(text);null" json:"comment"`
|
||||
Result int8 `orm:"column(result);default(0)" json:"result"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingTenderEvaluation) TableName() string {
|
||||
return "yz_backend_crm_bidding_tender_evaluation"
|
||||
}
|
||||
|
||||
// TenantCrmBiddingTenderResult 定标结果: yz_backend_crm_bidding_tender_result
|
||||
type TenantCrmBiddingTenderResult struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
TenantID string `orm:"column(tenant_id);size(64)" json:"tenant_id"`
|
||||
TenderID uint64 `orm:"column(tender_id);default(0)" json:"tender_id"`
|
||||
ResultType int8 `orm:"column(result_type);default(1)" json:"result_type"`
|
||||
WinnerSupplierID *uint64 `orm:"column(winner_supplier_id);null" json:"winner_supplier_id"`
|
||||
WinnerSupplierName string `orm:"column(winner_supplier_name);size(200)" json:"winner_supplier_name"`
|
||||
WinnerAmount float64 `orm:"column(winner_amount);digits(14);decimals(2);default(0)" json:"winner_amount"`
|
||||
ResultDate *time.Time `orm:"column(result_date);type(datetime);null" json:"result_date"`
|
||||
Announcement string `orm:"column(announcement);type(text);null" json:"announcement"`
|
||||
ContractID *uint64 `orm:"column(contract_id);null" json:"contract_id"`
|
||||
ProjectID *uint64 `orm:"column(project_id);null" json:"project_id"`
|
||||
CreateUserID string `orm:"column(create_user_id);size(64)" json:"create_user_id"`
|
||||
CreateUserName string `orm:"column(create_user_name);size(128)" json:"create_user_name"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *TenantCrmBiddingTenderResult) TableName() string {
|
||||
return "yz_backend_crm_bidding_tender_result"
|
||||
}
|
||||
Reference in New Issue
Block a user