Files
auth_service_swift/Sources/auth_service/DTOs/TodoDTO.swift
T
2025-11-09 02:24:21 +07:00

18 lines
299 B
Swift

import Fluent
import Vapor
struct TodoDTO: Content {
var id: UUID?
var title: String?
func toModel() -> Todo {
let model = Todo()
model.id = self.id
if let title = self.title {
model.title = title
}
return model
}
}