2019-07-07 12:09:54 +02:00
|
|
|
require "uuid"
|
|
|
|
|
|
|
|
class Task
|
|
|
|
JSON.mapping({
|
|
|
|
id: String,
|
|
|
|
author: Int32,
|
|
|
|
title: String,
|
|
|
|
description: String,
|
|
|
|
column: String,
|
2019-07-08 06:31:13 +02:00
|
|
|
assigned_to: Int32?,
|
|
|
|
color: {
|
|
|
|
type: String,
|
|
|
|
default: "dark"
|
|
|
|
}
|
2019-07-07 12:09:54 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
def initialize(@title, @author, @description, @column)
|
|
|
|
@id = UUID.random.to_s
|
2019-07-08 06:31:13 +02:00
|
|
|
@color = "dark"
|
2019-07-07 12:09:54 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|