mirror of
https://github.com/a-mayb3/KanbanCloneAndroid.git
synced 2026-03-21 10:05:39 +01:00
Created base classes and RetroFit objects (idk if im gonna use the base classes tho)
This commit is contained in:
parent
0a2f234bfb
commit
a91258ff05
3 changed files with 105 additions and 0 deletions
|
|
@ -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<User> = emptyList()
|
||||||
|
val tasks: List<Task> = 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
|
||||||
|
)
|
||||||
|
|
@ -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
|
||||||
|
)
|
||||||
|
|
@ -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<Project> = 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<ProjectBase>
|
||||||
|
)
|
||||||
|
|
||||||
|
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
|
||||||
|
)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue