Created
November 18, 2021 22:52
-
-
Save Gizmodo/2b146e2a6e91b558d10dd5a69de50b3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.shop.tcd.model | |
import com.tickaroo.tikxml.annotation.Attribute | |
import com.tickaroo.tikxml.annotation.Element | |
import com.tickaroo.tikxml.annotation.PropertyElement | |
import com.tickaroo.tikxml.annotation.Xml | |
@Xml(name = "Настройки") | |
class Task { | |
@Element(name = "Магазины") | |
var shops: XMLTagShops? = null | |
@Element | |
var users: User? = null | |
} | |
@Xml(name = "Магазины") | |
class XMLTagShops { | |
@Element(name = "Магазин") | |
var shops: List<Book>? = null | |
} | |
@Xml(name = "Пользователи") | |
class User { | |
@Element | |
var groups: List<Grp>? = null | |
} | |
@Xml(name = "Группа") | |
class Grp { | |
@Attribute(name = "Наименование") | |
var name: String? = null | |
@Element(name = "Пользователь") | |
var usersList: List<XMLUser>? = null | |
override fun toString(): String { | |
return "Группа: наименование $name" | |
} | |
} | |
@Xml(name = "Пользователь") | |
class XMLUser { | |
@Attribute(name = "Логин") | |
var login: String? = null | |
@Attribute(name = "Пароль") | |
var password: String? = null | |
} | |
@Xml(name = "Магазин") | |
class XMLShop { | |
@Element(name = "Магазин") | |
var shops: List<Book>? = null | |
} | |
@Xml(name = "Магазин") | |
class Book { | |
@Attribute(name = "Наименование") | |
var name: String? = null | |
@Attribute(name = "Адрес") | |
var address: String? = null | |
@Attribute(name = "ПрефиксМагазина") | |
var prefixShop: String? = null | |
@Attribute(name = "ПрефиксВесовогоТовара") | |
var prefixWeight: String? = null | |
@Attribute(name = "ПрефиксВесовогоТовараПЛУ") | |
var prefixWeightPLU: String? = null | |
@Attribute(name = "ПрефиксШтучногоТовара") | |
var prefixSingle: String? = null | |
@PropertyElement | |
var title: String? = null | |
override fun toString(): String { | |
return "Магазин: наименование $name адрес $address" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment