23 lines
320 B
Crystal
23 lines
320 B
Crystal
require "uuid"
|
|
|
|
class Task
|
|
JSON.mapping({
|
|
id: String,
|
|
author: Int32,
|
|
title: String,
|
|
description: String,
|
|
column: String,
|
|
assigned_to: Int32?,
|
|
color: {
|
|
type: String,
|
|
default: "dark"
|
|
}
|
|
})
|
|
|
|
def initialize(@title, @author, @description, @column)
|
|
@id = UUID.random.to_s
|
|
@color = "dark"
|
|
end
|
|
end
|
|
|