package com.mycrib.shared.models import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable data class Residence( val id: Int, val owner: Int? = null, @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: Int, @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 ) @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, @SerialName("tasks_due_next_week") val tasksDueNextWeek: Int, @SerialName("tasks_due_next_month") val tasksDueNextMonth: Int ) @Serializable data class ResidenceWithTasks( 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, @SerialName("task_summary") val taskSummary: TaskSummary, val tasks: List, @SerialName("created_at") val createdAt: String, @SerialName("updated_at") val updatedAt: String ) @Serializable data class MyResidencesSummary( @SerialName("total_residences") val totalResidences: Int, @SerialName("total_tasks") val totalTasks: Int, @SerialName("tasks_due_next_week") val tasksDueNextWeek: Int, @SerialName("tasks_due_next_month") val tasksDueNextMonth: Int ) @Serializable data class MyResidencesResponse( val summary: MyResidencesSummary, val residences: List )