103 lines
3.9 KiB
Go
103 lines
3.9 KiB
Go
|
|
package v1
|
|||
|
|
|
|||
|
|
import "github.com/gogf/gf/v2/frame/g"
|
|||
|
|
|
|||
|
|
// ============================================================================
|
|||
|
|
// C 端软件开发服务二期契约(迭代-2026-09-30):介绍页模块 / 作品案例 / 报价申请
|
|||
|
|
//
|
|||
|
|
// - 介绍页模块(service_blocks)由管理端逐块编辑(预设排版布局),C 端按 sort 输出;
|
|||
|
|
// - 图片字段库内只存相对路径,输出统一为绝对 URL(同 goods 封面约定);
|
|||
|
|
// - 报价申请提交后写站内信回执;处理结果(已报价/成交/关闭)再推站内信。
|
|||
|
|
// ============================================================================
|
|||
|
|
|
|||
|
|
// ServiceBlockOut 介绍页模块(响应 snake_case)
|
|||
|
|
type ServiceBlockOut struct {
|
|||
|
|
Id int64 `json:"id"`
|
|||
|
|
Kind string `json:"kind"` // hero/rich/image_text/image_list/developer/works/goods
|
|||
|
|
Title string `json:"title"`
|
|||
|
|
Subtitle string `json:"subtitle"`
|
|||
|
|
ImageUrl string `json:"image_url"` // 主图绝对 URL(可能为空)
|
|||
|
|
Images []string `json:"images"` // 图集绝对 URL(image_list)
|
|||
|
|
Content string `json:"content"` // Markdown 原文,前端解析渲染
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// ServicePageReq 服务介绍页模块列表(仅启用,sort 升序)
|
|||
|
|
type ServicePageReq struct {
|
|||
|
|
g.Meta `path:"/service/page" method:"get" tags:"service" summary:"软件开发服务介绍页"`
|
|||
|
|
}
|
|||
|
|
type ServicePageRes struct {
|
|||
|
|
List []ServiceBlockOut `json:"list"`
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// WorkItem 作品列表项
|
|||
|
|
type WorkItem struct {
|
|||
|
|
Id int64 `json:"id"`
|
|||
|
|
Category int `json:"category"`
|
|||
|
|
CategoryName string `json:"category_name"`
|
|||
|
|
Title string `json:"title"`
|
|||
|
|
Summary string `json:"summary"`
|
|||
|
|
CoverUrl string `json:"cover_url"`
|
|||
|
|
PriceCents int64 `json:"price_cents"` // 0 = 面议
|
|||
|
|
PriceNote string `json:"price_note"`
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// WorksListReq 作品列表(仅上架)
|
|||
|
|
type WorksListReq struct {
|
|||
|
|
g.Meta `path:"/service/works" method:"get" tags:"service" summary:"软件开发作品列表"`
|
|||
|
|
Category int `json:"category"` // 0=全部
|
|||
|
|
Page int `json:"page"`
|
|||
|
|
PageSize int `json:"pageSize"`
|
|||
|
|
}
|
|||
|
|
type WorksListRes struct {
|
|||
|
|
List []WorkItem `json:"list"`
|
|||
|
|
Total int `json:"total"`
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// WorkDetailReq 作品详情(含图集与 Markdown 详情)
|
|||
|
|
type WorkDetailReq struct {
|
|||
|
|
g.Meta `path:"/service/works/detail" method:"get" tags:"service" summary:"软件开发作品详情"`
|
|||
|
|
Id int64 `v:"required" json:"id"`
|
|||
|
|
}
|
|||
|
|
type WorkDetailRes struct {
|
|||
|
|
WorkItem
|
|||
|
|
Images []string `json:"images"` // 详情图集(绝对 URL)
|
|||
|
|
ContentMd string `json:"content_md"`
|
|||
|
|
UpdatedAt string `json:"updated_at"`
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// QuoteSubmitReq 提交报价申请(需求 → 站内信回执)
|
|||
|
|
type QuoteSubmitReq struct {
|
|||
|
|
g.Meta `path:"/service/quote/submit" method:"post" tags:"service" summary:"提交软件开发报价申请"`
|
|||
|
|
WorkId int64 `json:"work_id"` // 0 = 通用申请(不关联作品)
|
|||
|
|
Contact string `v:"required#请填写联系方式" json:"contact"`
|
|||
|
|
Requirement string `v:"required#请描述您的需求" json:"requirement"`
|
|||
|
|
Budget string `json:"budget"` // 预算范围文案,可空
|
|||
|
|
}
|
|||
|
|
type QuoteSubmitRes struct {
|
|||
|
|
Id int64 `json:"id"`
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// QuoteMineItem 我的报价申请条目(含处理结果)
|
|||
|
|
type QuoteMineItem struct {
|
|||
|
|
Id int64 `json:"id"`
|
|||
|
|
WorkId int64 `json:"work_id"`
|
|||
|
|
WorkTitle string `json:"work_title"`
|
|||
|
|
Requirement string `json:"requirement"`
|
|||
|
|
Budget string `json:"budget"`
|
|||
|
|
Status int `json:"status"`
|
|||
|
|
StatusText string `json:"status_text"`
|
|||
|
|
QuoteCents int64 `json:"quote_cents"` // 0=面议/未填
|
|||
|
|
QuoteNote string `json:"quote_note"`
|
|||
|
|
HandledAt string `json:"handled_at"`
|
|||
|
|
CreatedAt string `json:"created_at"`
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// QuoteMineReq 我的报价申请(最近 N 条)
|
|||
|
|
type QuoteMineReq struct {
|
|||
|
|
g.Meta `path:"/service/quote/mine" method:"get" tags:"service" summary:"我的报价申请"`
|
|||
|
|
Limit int `json:"limit"`
|
|||
|
|
}
|
|||
|
|
type QuoteMineRes struct {
|
|||
|
|
List []QuoteMineItem `json:"list"`
|
|||
|
|
}
|