package
Version:
v0.0.15
Opens a new window with list of versions in this module.
Published: Jul 16, 2024
License: MIT
Opens a new window with license information.
Imports: 13
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func Marshal[T any](apiTypesStruct any) T
Marshal
@Description: 将Api的Model序列化为数据库的Model
@param apiTypesStruct ApiModel
@return T DbModel
NewDb
@Description: 创建数据库
@param cfgSection 配置节点,用于启动多个数据库不用配置
@return *gorm.DB
func UnMarshal[T any](dbModel any) T
UnMarshal
@Description: 将数据库的Model反序列化到Api的Model
@param dbModel DbModel
@return T ApiModel
Source Files
¶
Click to show internal directories.
Click to hide internal directories.