//
//  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
    }
}
