🎨 新增用户&完善文章模块

This commit is contained in:
2025-04-09 19:16:49 +08:00
parent f8e7b9dad2
commit 00df85c4f0
20 changed files with 431 additions and 92 deletions

View File

@@ -6,11 +6,12 @@ import (
type Article struct {
global.GVA_MODEL
Title string `json:"title" gorm:"comment:文章标题"`
Desc string `json:"desc" gorm:"comment:文章描述"`
Content string `json:"content" gorm:"comment:文章内容"`
CoverImg string `json:"coverImg" gorm:"comment:文章封面图"`
Price int64 `json:"price" gorm:"comment:文章价格(单位为分)"`
Title string `json:"title" gorm:"comment:文章标题"`
Desc string `json:"desc" gorm:"comment:文章描述"`
Content string `json:"content" gorm:"comment:文章内容"`
CoverImg string `json:"coverImg" gorm:"comment:文章封面图"`
TeacherId int `json:"teacherId" gorm:"comment:讲师ID"`
Price int64 `json:"price" gorm:"comment:文章价格(单位为分)"`
}
// TableName 文章表

View File

@@ -0,0 +1,13 @@
package vo
type ArticleVo struct {
ID int `json:"id" gorm:"comment:文章ID"`
Title string `json:"title" gorm:"comment:文章标题"`
Desc string `json:"desc" gorm:"comment:文章描述"`
Content string `json:"content" gorm:"comment:文章内容"`
CoverImg string `json:"coverImg" gorm:"comment:文章封面图"`
Price int64 `json:"price" gorm:"comment:文章价格(单位为分)"`
TeacherId int `json:"teacherId" gorm:"comment:讲师ID"`
TeacherName string `json:"teacherName" gorm:"comment:讲师名称"`
TeacherAvatar string `json:"teacherAvatar" gorm:"comment:讲师头像"`
}