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, @SerialName("is_primary_owner") val isPrimaryOwner: Boolean = false, @SerialName("user_count") val userCount: Int = 1, 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: Double?, @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 TaskColumnIcon( val ios: String, val android: String, val web: String ) @Serializable data class TaskColumnCategory( val name: String, @SerialName("display_name") val displayName: String, val icons: TaskColumnIcon, val color: String, val count: Int ) @Serializable data class TaskSummary( val total: Int, val categories: List ) @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 lastCompletedCustomTask: CustomTask?, @SerialName("next_upcoming_task") val nextUpcomingCustomTask: CustomTask?, @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, @SerialName("is_primary_owner") val isPrimaryOwner: Boolean = false, @SerialName("user_count") val userCount: Int = 1, 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: Double?, @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 ) // Share Code Models @Serializable data class ResidenceShareCode( val id: Int, val code: String, val residence: Int, @SerialName("residence_name") val residenceName: String, @SerialName("created_by") val createdBy: Int, @SerialName("created_by_username") val createdByUsername: String, @SerialName("is_active") val isActive: Boolean, @SerialName("created_at") val createdAt: String, @SerialName("expires_at") val expiresAt: String? ) @Serializable data class JoinResidenceRequest( val code: String ) @Serializable data class JoinResidenceResponse( val message: String, val residence: Residence ) // User Management Models @Serializable data class ResidenceUser( val id: Int, val username: String, val email: String, @SerialName("first_name") val firstName: String?, @SerialName("last_name") val lastName: String? ) @Serializable data class ResidenceUsersResponse( @SerialName("owner_id") val ownerId: Int, val users: List ) @Serializable data class RemoveUserResponse( val message: String )