Initial commit: Kotlin Multiplatform project setup
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
package com.mycrib.shared.models
|
||||
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class Task(
|
||||
val id: Int,
|
||||
val residence: Int,
|
||||
@SerialName("created_by") val createdBy: Int,
|
||||
@SerialName("created_by_username") val createdByUsername: String,
|
||||
val title: String,
|
||||
val description: String?,
|
||||
val category: String,
|
||||
val priority: String,
|
||||
val status: String,
|
||||
@SerialName("due_date") val dueDate: String,
|
||||
@SerialName("estimated_cost") val estimatedCost: String?,
|
||||
@SerialName("actual_cost") val actualCost: String?,
|
||||
val notes: String?,
|
||||
@SerialName("created_at") val createdAt: String,
|
||||
@SerialName("updated_at") val updatedAt: String,
|
||||
@SerialName("days_until_due") val daysUntilDue: Int? = null,
|
||||
@SerialName("is_overdue") val isOverdue: Boolean? = null,
|
||||
@SerialName("last_completion") val lastCompletion: LastCompletion? = null
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class LastCompletion(
|
||||
@SerialName("completion_date") val completionDate: String,
|
||||
@SerialName("completed_by") val completedBy: String?,
|
||||
@SerialName("actual_cost") val actualCost: String?,
|
||||
val rating: Int?
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class TaskCreateRequest(
|
||||
val residence: Int,
|
||||
val title: String,
|
||||
val description: String? = null,
|
||||
val category: String,
|
||||
val priority: String,
|
||||
val status: String = "pending",
|
||||
@SerialName("due_date") val dueDate: String,
|
||||
@SerialName("estimated_cost") val estimatedCost: String? = null,
|
||||
val notes: String? = null
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class TaskDetail(
|
||||
val id: Int,
|
||||
val residence: Int,
|
||||
@SerialName("created_by") val createdBy: Int,
|
||||
@SerialName("created_by_username") val createdByUsername: String,
|
||||
val title: String,
|
||||
val description: String?,
|
||||
val category: String,
|
||||
val priority: String,
|
||||
val status: String,
|
||||
@SerialName("due_date") val dueDate: String,
|
||||
@SerialName("estimated_cost") val estimatedCost: String?,
|
||||
@SerialName("actual_cost") val actualCost: String?,
|
||||
val notes: String?,
|
||||
@SerialName("created_at") val createdAt: String,
|
||||
@SerialName("updated_at") val updatedAt: String,
|
||||
val completions: List<TaskCompletion>
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class TasksByResidenceResponse(
|
||||
@SerialName("residence_id") val residenceId: String,
|
||||
val summary: TaskSummary,
|
||||
val tasks: List<TaskDetail>
|
||||
)
|
||||
Reference in New Issue
Block a user