package entity import "gopkg.in/guregu/null.v3" type Order struct { Id string `db:"id"` //订单编号 Name string `db:"name"` //客户姓名 Gender int `db:"gender"` //姓名 Age int `db:"age"` //年龄 Birthday string `db:"birthday"` Address string `db:"address"` //上门地址 DetailAddress string `db:"detail_address"` //详细地址 VisitDate string `db:"visit_date"` //上门日期 VisitTimeRange string `db:"visit_time_range"` //上门时间段 Source string `db:"source"` //订单来源 Status int `db:"status"` //订单状态(1待支付,2待接单-匹配客户经理以及护士,3待上门,4待上传化验结果,5已完成) WorkFee int `db:"work_fee,positive"` //上门费 FreeFee int `db:"free_fee"` //优惠费用 RepeatItemFee int `db:"repeat_item_fee"` //重复项减免费用 Payment int `db:"payment,positive"` //订单需支付金额 OnlinePayment int `db:"online_payment,positive"` ActualPayment int `db:"actual_payment"` //实际支付金额 VActualPayment int `db:"v_actual_payment"` PaymentTime string `db:"payment_time,omitempty"` //支付时间 PayType int `db:"pay_type,omitempty"` //支付类型 PayNo string `db:"pay_no,omitempty"` //支付流水号 CustomManagerId string `db:"cm_id,omitempty" json:"CmId"` //客户经理id 20210331 用于保存json 字段,查看是否点击扣减活动 NourseId string `db:"nurse_id,omitempty"` //护士id IsOthers int `db:"is_others"` //是否为替他人下单 IsMerged int `db:"is_merged"` //是否被合并 BloodCodes string `db:"blood_codes,omitempty"` //血检条码 AssayTime string `db:"assay_time,omitempty"` //上门时间 CustomId int `db:"custom_id"` CustomMobile string `db:"custom_mobile"` //下单人电话 Mobile string `db:"mobile"` //被下单人电话 MaterialId int `db:"m_id"` //占用产能id Remark string `db:"remark,omitempty"` AdminRemark string `db:"admin_remark"` UpdatedAt string `db:"updated_at"` CreatedAt string `db:"created_at"` IsViewReport string `db:"is_view_report"` ShareCode string `db:"share_code"` IsAgent uint `db:"isagent"` Type string `db:"type"` //集采类型 BloodTestId string `db:"null"` OpenId string `db:"null"` Relationship string `db:"null"` IsYunxue int `db:"null"` IsDfguomin int `db:"null"` ProductIds []OrderProduct `db:"null"` ItemIds []int `db:"null"` Coupons []int `db:"null"` IsNeedPay string `db:"null"` LinkerId int `db:"linker_id"` CreatedBy string `db:"created_by"` PTId int `db:"null"` ToOpenID string `db:"null",json:"toopenid"` IdNum string `db:"id_num",json:"IdNum"` NurseId string `db:"null",json:"NurseId"` ServiceRemark string `db:"service_remark"` JdOrderId string `db:"jd_order_id",json:"JdOrderId"` //20210225 微医 扩展字段,占用 京东订单号 Zone string `db:"zone" json:"zone"` //20210324 增加json存储省市区字段 Coordinates string `db:"coordinates" json:"Coordinates"` //20210922 添加订单坐标 PreOrderId string `db:"pre_order_id" json:"PreOrderId"` //20211112 主单id,订单变为服务单 ShareSource string `db:"share_source" json:"ShareSource"` //20220428 增加保存json 字段 IsZFB bool `db:"null"` AccountType string `db:"account_type" json:"AccountType"` //20230904 增加微信支付账户类型 主要分博德,云动脉等 } type OrderDB struct { Id string `db:"id"` //订单编号 Name string `db:"name"` //客户姓名 Gender int `db:"gender"` //姓名 Age int `db:"age"` //年龄 Birthday string `db:"birthday"` Address string `db:"address"` //上门地址 DetailAddress string `db:"detail_address"` //详细地址 VisitDate null.String `db:"visit_date"` //上门日期 VisitTimeRange null.String `db:"visit_time_range"` //上门时间段 Source string `db:"source"` //订单来源 Status int `db:"status"` //订单状态(1待支付,2待接单-匹配客户经理以及护士,3待上门,4待上传化验结果,5已完成) WorkFee null.Int `db:"work_fee"` //上门费 FreeFee int `db:"free_fee"` //优惠费用 RepeatItemFee int `db:"repeat_item_fee"` //重复项减免费用 Payment int `db:"payment"` //订单需支付金额 OnlinePayment int `db:"online_payment"` ActualPayment null.Int `db:"actual_payment"` //实际支付金额 VActualPayment int `db:"v_actual_payment"` //拆单时用 PaymentTime null.String `db:"payment_time"` //支付时间 PayType null.Int `db:"pay_type"` //支付类型 PayNo null.String `db:"pay_no"` CustomManagerId null.String `db:"cm_id"` //客户经理id NourseId null.String `db:"nurse_id"` //护士id IsOthers int `db:"is_others"` //是否为替他人下单 IsMerged int `db:"is_merged"` //是否被合并 BloodCodes null.String `db:"blood_codes"` //血检条码 AssayTime null.String `db:"assay_time"` //上门时间 CustomId null.Int `db:"custom_id"` CustomMobile string `db:"custom_mobile"` //下单人电话 Mobile string `db:"mobile"` //被下单人电话 MaterialId int `db:"m_id"` //占用产能id ReportPicture string `db:"report_picture"` IsViewReport string `db:"is_view_report"` Remark null.String `db:"remark"` UpdatedAt string `db:"updated_at"` CreatedAt string `db:"created_at,omitempty"` IsNotice string `db:"is_notice"` ThirdPayNo null.String `db:"third_pay_no" json:"-"` DelayDeadtime uint `db:"delay_deadtime" json:"delay_deadtime"` //订单失效时间延迟时长 Relationship null.String `db:"relationship"` RelId null.Int `db:"rel_id"` IsYunxue null.Int `db:"is_yunxue"` IsDfguomin null.Int `db:"is_dfguomin"` Type string `db:"type" json:"type"` //订单类型 BloodTestId null.String `db:"bloodtest_id" json:"bloodtest_id"` NeedEmptiness null.Int `db:"need_emptiness"` ReportPeriod null.String `db:"report_period"` PressurePipe null.String `db:"pressure_pipe"` BloodAddress null.String `db:"blood_address"` Notice null.String `db:"notice"` IsFetchData int `db:"is_fetch_data"` NurseRemark null.String `db:"nurse_remark"` ServiceRemark null.String `db:"service_remark"` OriginalReport null.String `db:"original_report"` JdOrderId null.String `db:"jd_order_id"` Zone null.String `db:"zone" json:"zone"` //20210324 增加json存储省市区字段 Coordinates null.String `db:"coordinates" json:"coordinates"` //20210324 增加json存储省市区字段 IdNum null.String `db:"id_num",json:"IdNum"` //20220208 增加身份证id PreOrderId string `db:"pre_order_id" json:"PreOrderId"` //20211112 主单id,订单变为服务单 ShareSource null.String `db:"share_source" ` //20220428 增加保存json 字段 } // order/add 用 20200814 qz add type AgentEntity struct { Id string `db:"id"` OpenId string `db:"openid"` CreateTime string `db:"createtime"` UpdateTime string `db:"updatetime"` UserParentId null.String `db:"userparentid"` AgentType null.Int `db:"type"` RedPacket null.Int `db:"redpacket"` } // qz 检测项录入 传参 20200826 type DetectInfoParam struct { OrderId string `json:"order_no"` DetectItemID int `json:"detect_item_id"` Final string `json:"final"` Unit string `json:"unit"` RefValue string `json:"refValue"` Status int `json:"final_status"` CreatedAt string `json:"createdAt"` IsSelf int `json:"is_self"` } // qz 检测项录入 DB数据 20200826 type DetectInfoDB struct { OrderId string `db:"order_no"` DetectItemID int `db:"detect_item_id"` Final string `db:"final"` Unit string `db:"unit"` RefValue null.String `db:"refValue"` Age null.String `db:"age"` Gender null.String `db:"gender"` Checker null.String `db:"checker"` Approver null.String `db:"approver"` CheckTime null.String `db:"checkTime"` CreatedAt string `db:"createdAt"` IsSelf int `db:"is_self"` FinalStatus int `db:"final_status"` FinalTip null.String `db:"final_tip"` Extra null.String `db:"extra"` }