Files
cod-backend/Sources/App/Models/Todo.swift
Michael Simard ba9bfd5e6a first commit
2020-05-25 20:58:43 -05:00

20 lines
300 B
Swift

import Fluent
import Vapor
final class Todo: Model, Content {
static let schema = "todos"
@ID(key: .id)
var id: UUID?
@Field(key: "title")
var title: String
init() { }
init(id: UUID? = nil, title: String) {
self.id = id
self.title = title
}
}