Rebrand from Casera/MyCrib to honeyDue
Total rebrand across KMM project: - Kotlin package: com.example.casera -> com.tt.honeyDue (dirs + declarations) - Gradle: rootProject.name, namespace, applicationId - Android: manifest, strings.xml (all languages), widget resources - iOS: pbxproj bundle IDs, Info.plist, entitlements, xcconfig - iOS directories: Casera/ -> HoneyDue/, CaseraTests/ -> HoneyDueTests/, etc. - Swift source: all class/struct/enum renames - Deep links: casera:// -> honeydue://, .casera -> .honeydue - App icons replaced with honeyDue honeycomb icon - Domains: casera.treytartt.com -> honeyDue.treytartt.com - Bundle IDs: com.tt.casera -> com.tt.honeyDue - Database table names preserved Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
package com.tt.honeyDue.models
|
||||
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
/**
|
||||
* Represents a task template fetched from the backend API.
|
||||
* Users can select these when adding a new task to auto-fill form fields.
|
||||
*/
|
||||
@Serializable
|
||||
data class TaskTemplate(
|
||||
val id: Int,
|
||||
val title: String,
|
||||
val description: String = "",
|
||||
@SerialName("category_id") val categoryId: Int? = null,
|
||||
val category: TaskCategory? = null,
|
||||
@SerialName("frequency_id") val frequencyId: Int? = null,
|
||||
val frequency: TaskFrequency? = null,
|
||||
@SerialName("icon_ios") val iconIos: String = "",
|
||||
@SerialName("icon_android") val iconAndroid: String = "",
|
||||
val tags: List<String> = emptyList(),
|
||||
@SerialName("display_order") val displayOrder: Int = 0,
|
||||
@SerialName("is_active") val isActive: Boolean = true
|
||||
) {
|
||||
/**
|
||||
* Human-readable frequency display
|
||||
*/
|
||||
val frequencyDisplay: String
|
||||
get() = frequency?.displayName ?: "One time"
|
||||
|
||||
/**
|
||||
* Category name for display
|
||||
*/
|
||||
val categoryName: String
|
||||
get() = category?.name ?: "Uncategorized"
|
||||
}
|
||||
|
||||
/**
|
||||
* Response for grouped templates by category
|
||||
*/
|
||||
@Serializable
|
||||
data class TaskTemplateCategoryGroup(
|
||||
@SerialName("category_name") val categoryName: String,
|
||||
@SerialName("category_id") val categoryId: Int? = null,
|
||||
val templates: List<TaskTemplate>,
|
||||
val count: Int
|
||||
)
|
||||
|
||||
/**
|
||||
* Response for all templates grouped by category
|
||||
*/
|
||||
@Serializable
|
||||
data class TaskTemplatesGroupedResponse(
|
||||
val categories: List<TaskTemplateCategoryGroup>,
|
||||
@SerialName("total_count") val totalCount: Int
|
||||
)
|
||||
Reference in New Issue
Block a user