2018-12-18 22:18:06 +01:00
|
|
|
module d_webservice_example.model.todo;
|
|
|
|
|
|
|
|
struct Todo
|
|
|
|
{
|
|
|
|
import std.uuid : UUID;
|
|
|
|
import vibe.data.serialization : name;
|
|
|
|
|
|
|
|
this(string title, string content) nothrow pure @safe @nogc
|
|
|
|
{
|
|
|
|
this.title = title;
|
|
|
|
this.content = content;
|
|
|
|
}
|
|
|
|
|
|
|
|
this(string title, string content, UUID uuid) nothrow pure @safe @nogc
|
|
|
|
{
|
|
|
|
this.title = title;
|
|
|
|
this.content = content;
|
|
|
|
this.uuid = uuid;
|
|
|
|
}
|
|
|
|
|
2018-12-19 01:45:34 +01:00
|
|
|
this(string title, string content, UUID uuid, string id) nothrow pure @safe @nogc
|
|
|
|
{
|
|
|
|
this.title = title;
|
|
|
|
this.content = content;
|
|
|
|
this.uuid = uuid;
|
|
|
|
this.id = id;
|
|
|
|
}
|
|
|
|
|
2018-12-18 22:18:06 +01:00
|
|
|
string title;
|
|
|
|
string content;
|
|
|
|
|
|
|
|
UUID uuid;
|
|
|
|
|
|
|
|
@name("_id")
|
|
|
|
string id;
|
|
|
|
}
|