feat(trade): implement second-hand trading/flea market feature
Add complete trade functionality including: - TradeItem, TradeImage, TradeFavorite models with auto-migration - TradeRepository with CRUD and favorite operations - TradeService with business logic for listing, creating, updating, status management - TradeHandler with RESTful endpoints for trade operations - DTOs and converters for request/response handling Routes include: list, get by id, create, update, delete, status update, view recording, favorite/unfavorite.
This commit is contained in:
@@ -179,6 +179,11 @@ func autoMigrate(db *gorm.DB) error {
|
||||
|
||||
// 帖子内链引用关系
|
||||
&PostReference{},
|
||||
|
||||
// 二手交易相关
|
||||
&TradeItem{},
|
||||
&TradeImage{},
|
||||
&TradeFavorite{},
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user