- Updated the application namespace and ID from "net.ypchat.app" to "de.ypchat.android" for better alignment with branding. - Increased Gradle heap size settings to optimize build performance. - Disabled dependency constraints to simplify dependency management. - Removed obsolete files related to the previous application structure, including MainActivity, YpChatApp, and various core components, streamlining the codebase. These changes collectively enhance the application's configuration and structure, improving maintainability and performance.
106 lines
2.4 KiB
Swift
106 lines
2.4 KiB
Swift
import Foundation
|
|
|
|
// MARK: - Session / User (RestApi.kt / Models.kt)
|
|
|
|
struct UserDto: Codable, Equatable, Sendable {
|
|
var sessionId: String?
|
|
var userName: String = ""
|
|
var gender: String = ""
|
|
var age: Int = 0
|
|
var country: String = ""
|
|
var isoCountryCode: String = ""
|
|
}
|
|
|
|
struct SessionResponse: Codable, Equatable, Sendable {
|
|
var loggedIn: Bool = false
|
|
var sessionId: String?
|
|
var user: UserDto?
|
|
}
|
|
|
|
struct LogoutResponse: Codable, Equatable, Sendable {
|
|
var success: Bool = false
|
|
}
|
|
|
|
// MARK: - Chat / Listen (Socket / Models.kt)
|
|
|
|
struct ChatMessageDto: Codable, Equatable, Sendable {
|
|
var from: String = ""
|
|
var to: String?
|
|
var message: String = ""
|
|
var messageId: String?
|
|
var timestamp: String = ""
|
|
var read: Bool = false
|
|
var isImage: Bool = false
|
|
var imageType: String?
|
|
var imageUrl: String?
|
|
var imageCode: String?
|
|
}
|
|
|
|
struct HistoryItemDto: Codable, Equatable, Sendable {
|
|
var userName: String = ""
|
|
var lastMessage: ChatMessageDto?
|
|
}
|
|
|
|
struct InboxItemDto: Codable, Equatable, Sendable {
|
|
var userName: String = ""
|
|
var unreadCount: Int = 0
|
|
}
|
|
|
|
// MARK: - REST (Models.kt)
|
|
|
|
struct CountryOption: Equatable, Sendable {
|
|
var englishName: String
|
|
var displayName: String
|
|
var isoCode: String
|
|
}
|
|
|
|
struct FeedbackItemDto: Codable, Equatable, Sendable {
|
|
var id: String = ""
|
|
var name: String?
|
|
var age: Int?
|
|
var country: String?
|
|
var gender: String?
|
|
var comment: String = ""
|
|
var createdAt: String = ""
|
|
}
|
|
|
|
struct FeedbackResponse: Codable, Equatable, Sendable {
|
|
var items: [FeedbackItemDto] = []
|
|
var admin: Bool = false
|
|
}
|
|
|
|
struct FeedbackAdminStatusResponse: Codable, Equatable, Sendable {
|
|
var authenticated: Bool = false
|
|
var username: String?
|
|
}
|
|
|
|
struct FeedbackRequest: Codable, Equatable, Sendable {
|
|
var name: String = ""
|
|
var age: Int?
|
|
var country: String = ""
|
|
var gender: String = ""
|
|
var comment: String = ""
|
|
}
|
|
|
|
struct FeedbackAdminLoginRequest: Codable, Equatable, Sendable {
|
|
var username: String = ""
|
|
var password: String = ""
|
|
}
|
|
|
|
struct PartnerLinkDto: Codable, Equatable, Sendable {
|
|
var pageName: String = ""
|
|
var url: String = ""
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case pageName = "Page Name"
|
|
case url
|
|
}
|
|
}
|
|
|
|
struct ImageUploadResponse: Codable, Equatable, Sendable {
|
|
var success: Bool = false
|
|
var code: String?
|
|
var url: String?
|
|
var error: String?
|
|
}
|