16.1. 话题模型和迁移

说明

这节开始我们来开发话题模块。

本节先来创建话题模型 Topic 和数据表 topics。

1. 创建模型

现在我们使用 make model 命令来创建话题模型:

$ go run main.go make model topic

[app/models/topic/topic_model.go] created.
[app/models/topic/topic_util.

本文章首发在 LearnKu.com 网站上。

为了保证课程的高品质,我们需要对课程进行收费。付费后 才能观看剩余内容。 购买

上一篇 下一篇
讨论数量: 1

MIYA28118
这里的 struct 中外键类型为何选择 string 而不是 int 呢?
0 个点赞 | 0 个回复 | 问答 | 课程版本 1.19