feat: 统一sql命名、函数命名
This commit is contained in:
15
internal/model/response/file.go
Normal file
15
internal/model/response/file.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"server/internal/db/sqlc"
|
||||
"server/internal/pkg/httputil"
|
||||
)
|
||||
|
||||
func ToFiles(files []sqlc.File) []sqlc.File {
|
||||
result := make([]sqlc.File, len(files))
|
||||
for i := range files {
|
||||
result[i] = files[i]
|
||||
result[i].FilePath = httputil.BuildFileUrl(&files[i].FilePath)
|
||||
}
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user