Files

53 lines
1.1 KiB
Swift
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// StoreModels.swift
// suixinkan
//
import Foundation
/// Android `StoreItem`
struct StoreItem: Codable, Equatable, Sendable {
let id: Int
let scenicId: Int
let name: String
let address: String
let status: Int
let statusText: String
enum CodingKeys: String, CodingKey {
case id
case scenicId = "scenic_id"
case name
case address
case status
case statusText = "status_text"
}
init(
id: Int = 0,
scenicId: Int = 0,
name: String = "",
address: String = "",
status: Int = 0,
statusText: String = ""
) {
self.id = id
self.scenicId = scenicId
self.name = name
self.address = address
self.status = status
self.statusText = statusText
}
}
/// Android `ListResponse<StoreItem>`
struct StoreListResponse: Codable, Sendable {
let total: Int
let list: [StoreItem]
init(total: Int = 0, list: [StoreItem] = []) {
self.total = total
self.list = list
}
}