diff --git a/app/src/main/java/com/campusaula/edbole/KanbanCloneAndroid/kanban/Project.kt b/app/src/main/java/com/campusaula/edbole/KanbanCloneAndroid/kanban/Project.kt new file mode 100644 index 0000000..2fb3a32 --- /dev/null +++ b/app/src/main/java/com/campusaula/edbole/KanbanCloneAndroid/kanban/Project.kt @@ -0,0 +1,27 @@ +package com.campusaula.edbole.KanbanCloneAndroid.kanban + +import com.google.gson.annotations.SerializedName + +class Project{ + val id: Int = 0 + val name: String = "" + val description: String = "" + val users: List = emptyList() + val tasks: List = emptyList() +} + +data class ProjectBase( + @SerializedName("id") + val id : Int, + @SerializedName("name") + val name : String, + @SerializedName("description") + val description : String +) + +data class ProjectCreate( + @SerializedName("name") + val name : String, + @SerializedName("description") + val description : String +) diff --git a/app/src/main/java/com/campusaula/edbole/KanbanCloneAndroid/kanban/Task.kt b/app/src/main/java/com/campusaula/edbole/KanbanCloneAndroid/kanban/Task.kt new file mode 100644 index 0000000..3681057 --- /dev/null +++ b/app/src/main/java/com/campusaula/edbole/KanbanCloneAndroid/kanban/Task.kt @@ -0,0 +1,38 @@ +package com.campusaula.edbole.KanbanCloneAndroid.kanban + +import com.google.gson.annotations.SerializedName + +enum class TaskStatus { + @SerializedName("PENDING") + PENDING, + @SerializedName("IN_PROGRESS") + IN_PROGRESS, + @SerializedName("COMPLETED") + COMPLETED, + @SerializedName("FAILED") + FAILED, + @SerializedName("STASHED") + STASHED +} + +class Task { + val id: Int = 0 + val title: String = "" + val description: String = "" + val status: TaskStatus = TaskStatus.PENDING + val project: Project? = null +} + +data class TaskBase( + @SerializedName("id") + val id : Int, + + @SerializedName("title") + val title : String, + + @SerializedName("description") + val description : String, + + @SerializedName("status") + val status: TaskStatus +) diff --git a/app/src/main/java/com/campusaula/edbole/KanbanCloneAndroid/kanban/User.kt b/app/src/main/java/com/campusaula/edbole/KanbanCloneAndroid/kanban/User.kt new file mode 100644 index 0000000..2721009 --- /dev/null +++ b/app/src/main/java/com/campusaula/edbole/KanbanCloneAndroid/kanban/User.kt @@ -0,0 +1,40 @@ +package com.campusaula.edbole.KanbanCloneAndroid.kanban + +import com.google.gson.annotations.SerializedName + +class User { + val id: Int = 0 + val email: String = "" + val password: String = "" + val projects: List = emptyList() +} + +data class UserBase ( + @SerializedName("id") + val id: Int, + @SerializedName("email") + val email: String +) + +data class ProjectUser( + @SerializedName("id") + val id: Int, + @SerializedName("email") + val email: String, + @SerializedName("projects") + val projects: List +) + +data class UserLogin ( + @SerializedName("email") + val email: String, + @SerializedName("password") + val password: String +) + +data class UserUpdatePassword( + @SerializedName("password") + val password: String, + @SerializedName("new_password") + val newPassword: String +)