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,95 @@
|
||||
package com.mycrib.shared.models
|
||||
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class Residence(
|
||||
val id: Int,
|
||||
val owner: Int,
|
||||
@SerialName("owner_username") val ownerUsername: String,
|
||||
val name: String,
|
||||
@SerialName("property_type") val propertyType: String,
|
||||
@SerialName("street_address") val streetAddress: String,
|
||||
@SerialName("apartment_unit") val apartmentUnit: String?,
|
||||
val city: String,
|
||||
@SerialName("state_province") val stateProvince: String,
|
||||
@SerialName("postal_code") val postalCode: String,
|
||||
val country: String,
|
||||
val bedrooms: Int?,
|
||||
val bathrooms: Float?,
|
||||
@SerialName("square_footage") val squareFootage: Int?,
|
||||
@SerialName("lot_size") val lotSize: Float?,
|
||||
@SerialName("year_built") val yearBuilt: Int?,
|
||||
val description: String?,
|
||||
@SerialName("purchase_date") val purchaseDate: String?,
|
||||
@SerialName("purchase_price") val purchasePrice: String?,
|
||||
@SerialName("is_primary") val isPrimary: Boolean = false,
|
||||
@SerialName("created_at") val createdAt: String,
|
||||
@SerialName("updated_at") val updatedAt: String
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class ResidenceCreateRequest(
|
||||
val name: String,
|
||||
@SerialName("property_type") val propertyType: String,
|
||||
@SerialName("street_address") val streetAddress: String,
|
||||
@SerialName("apartment_unit") val apartmentUnit: String? = null,
|
||||
val city: String,
|
||||
@SerialName("state_province") val stateProvince: String,
|
||||
@SerialName("postal_code") val postalCode: String,
|
||||
val country: String,
|
||||
val bedrooms: Int? = null,
|
||||
val bathrooms: Float? = null,
|
||||
@SerialName("square_footage") val squareFootage: Int? = null,
|
||||
@SerialName("lot_size") val lotSize: Float? = null,
|
||||
@SerialName("year_built") val yearBuilt: Int? = null,
|
||||
val description: String? = null,
|
||||
@SerialName("purchase_date") val purchaseDate: String? = null,
|
||||
@SerialName("purchase_price") val purchasePrice: String? = null,
|
||||
@SerialName("is_primary") val isPrimary: Boolean = false
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class TaskSummary(
|
||||
val total: Int,
|
||||
val completed: Int,
|
||||
val pending: Int,
|
||||
@SerialName("in_progress") val inProgress: Int,
|
||||
val overdue: Int
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class ResidenceSummary(
|
||||
val id: Int,
|
||||
val owner: Int,
|
||||
@SerialName("owner_username") val ownerUsername: String,
|
||||
val name: String,
|
||||
@SerialName("property_type") val propertyType: String,
|
||||
@SerialName("street_address") val streetAddress: String,
|
||||
@SerialName("apartment_unit") val apartmentUnit: String?,
|
||||
val city: String,
|
||||
@SerialName("state_province") val stateProvince: String,
|
||||
@SerialName("postal_code") val postalCode: String,
|
||||
val country: String,
|
||||
@SerialName("is_primary") val isPrimary: Boolean,
|
||||
@SerialName("task_summary") val taskSummary: TaskSummary,
|
||||
@SerialName("last_completed_task") val lastCompletedTask: Task?,
|
||||
@SerialName("next_upcoming_task") val nextUpcomingTask: Task?,
|
||||
@SerialName("created_at") val createdAt: String,
|
||||
@SerialName("updated_at") val updatedAt: String
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class ResidenceSummaryResponse(
|
||||
val summary: OverallSummary,
|
||||
val residences: List<ResidenceSummary>
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class OverallSummary(
|
||||
@SerialName("total_residences") val totalResidences: Int,
|
||||
@SerialName("total_tasks") val totalTasks: Int,
|
||||
@SerialName("total_completed") val totalCompleted: Int,
|
||||
@SerialName("total_pending") val totalPending: Int
|
||||
)
|
||||
Reference in New Issue
Block a user