02 2024 档案
摘要:常用的注释用法: @title: 指定 API 的标题。 @description: 对 API 的简要描述。 @version: API 的版本号。 @termsOfService: API 的使用条款。 @contact: API 的联系方式,例如邮箱。 @license: API 的许可证信息
阅读全文
摘要:当使用 GORM 进行数据库模型映射时,可以使用多种标签来定义字段的行为。以下是一些常用的 GORM 标签: gorm:"primary_key": 定义字段作为模型的主键。 gorm:"column:<column_name>": 指定字段在数据库表中的列名。 gorm:"type:<data_t
阅读全文