From cb094b62a884a0fb0a0325cd2c3fdeaedbdaea29 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Fri, 16 Nov 2018 16:50:59 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B8=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B2=D0=BE=D0=B3=D0=BE=20=D1=83=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=BD=D1=8F=20=D0=B2=D0=B5=D1=82=D0=B2=D0=B8,=20=D0=B2=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=BE=D0=B3=D0=BE,=20=D0=B8=20=D0=BC=D0=BE=D0=B4?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=20=D0=B4=D0=B5=D1=82=D0=B0=D0=BB=D0=B8.=20?= =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=B2?= =?UTF-8?q?=20=D0=B7=D0=B0=D0=B2=D0=B8=D1=81=D0=B8=D0=BC=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=B8=20=D0=B1=D0=B8=D0=B1=D0=BB=D0=B8=D0=BE=D1=82=D0=B5=D0=BA?= =?UTF-8?q?=D0=B8=20Gson,=20Retrofit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/caches/build_file_checksums.ser | Bin 537 -> 537 bytes app/build.gradle | 7 +- .../vrcatalog/model/DetailModel.java | 237 ++++++++++++++++++ .../vrcatalog/model/FirstLevelModel.java | 69 +++++ .../vrcatalog/model/SecondLevelModel.java | 67 +++++ 5 files changed, 378 insertions(+), 2 deletions(-) create mode 100644 app/src/main/java/ru/volgorobot/vrcatalog/model/DetailModel.java create mode 100644 app/src/main/java/ru/volgorobot/vrcatalog/model/FirstLevelModel.java create mode 100644 app/src/main/java/ru/volgorobot/vrcatalog/model/SecondLevelModel.java diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index 2f6f833776601a3c9893c6a53bcb25efc52fc661..4498d85cdcaf08b0f844b76263cfbfe2a21411aa 100644 GIT binary patch delta 32 qcmV+*0N?+a1epYonFEUJU9p^O0TJ$49iZjXqbkpnr6;ChSrmBfe-5Sq delta 32 ocmbQqGLvP(Oy-zL)*I*KFbdjneYTn&=@#?l|6bju;4rre0L?fJC;$Ke diff --git a/app/build.gradle b/app/build.gradle index 1cd3217..f39c78e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -25,6 +25,9 @@ dependencies { implementation 'com.android.support:design:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.1.3' testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + implementation 'com.github.bmelnychuk:atv:1.2.+' + implementation 'com.google.code.gson:gson:2.8.2' + implementation 'com.squareup.retrofit2:retrofit:2.1.0' + implementation 'com.squareup.retrofit2:converter-gson:2.1.0' + implementation 'com.android.support:recyclerview-v7:27.1.1' } diff --git a/app/src/main/java/ru/volgorobot/vrcatalog/model/DetailModel.java b/app/src/main/java/ru/volgorobot/vrcatalog/model/DetailModel.java new file mode 100644 index 0000000..273be0f --- /dev/null +++ b/app/src/main/java/ru/volgorobot/vrcatalog/model/DetailModel.java @@ -0,0 +1,237 @@ +package ru.volgorobot.vrcatalog.model; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +public class DetailModel { + + @SerializedName("ID") + @Expose + private Integer iD; + + @SerializedName("DetalTypeId") + @Expose + private Integer detalTypeId; + + @SerializedName("DetailSubTypeId") + @Expose + private Integer detailSubTypeId; + + @SerializedName("Name") + @Expose + private String name; + + @SerializedName("Number") + @Expose + private Integer number; + + @SerializedName("Place") + @Expose + private String place; + + @SerializedName("Price") + @Expose + private String price; + + @SerializedName("ManufacturerId") + @Expose + private Integer manufacturerId; + + @SerializedName("Country") + @Expose + private String country; + + @SerializedName("IsBU") + @Expose + private Boolean isBU; + + @SerializedName("BodyTypeId") + @Expose + private Integer bodyTypeId; + + @SerializedName("analogue") + @Expose + private String analogue; + + @SerializedName("docURL") + @Expose + private String docURL; + + @SerializedName("EdIzmId") + @Expose + private Integer edIzmId; + + @SerializedName("State") + @Expose + private String state; + + @SerializedName("Notes") + @Expose + private String notes; + + @SerializedName("ID_Shop") + @Expose + private Integer iDShop; + + public DetailModel() { + // Empty constructor + } + + public DetailModel(Integer iD, Integer detalTypeId, Integer detailSubTypeId, String name, Integer number, String place, String price, Integer manufacturerId, String country, Boolean isBU, Integer bodyTypeId, String analogue, String docURL, Integer edIzmId, String state, String notes, Integer iDShop) { + super(); + this.iD = iD; + this.detalTypeId = detalTypeId; + this.detailSubTypeId = detailSubTypeId; + this.name = name; + this.number = number; + this.place = place; + this.price = price; + this.manufacturerId = manufacturerId; + this.country = country; + this.isBU = isBU; + this.bodyTypeId = bodyTypeId; + this.analogue = analogue; + this.docURL = docURL; + this.edIzmId = edIzmId; + this.state = state; + this.notes = notes; + this.iDShop = iDShop; + } + + public Integer getID() { + return iD; + } + + public void setID(Integer iD) { + this.iD = iD; + } + + public Integer getDetalTypeId() { + return detalTypeId; + } + + public void setDetalTypeId(Integer detalTypeId) { + this.detalTypeId = detalTypeId; + } + + public Integer getDetailSubTypeId() { + return detailSubTypeId; + } + + public void setDetailSubTypeId(Integer detailSubTypeId) { + this.detailSubTypeId = detailSubTypeId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getNumber() { + return number; + } + + public void setNumber(Integer number) { + this.number = number; + } + + public String getPlace() { + return place; + } + + public void setPlace(String place) { + this.place = place; + } + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public Integer getManufacturerId() { + return manufacturerId; + } + + public void setManufacturerId(Integer manufacturerId) { + this.manufacturerId = manufacturerId; + } + + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + public Boolean getIsBU() { + return isBU; + } + + public void setIsBU(Boolean isBU) { + this.isBU = isBU; + } + + public Integer getBodyTypeId() { + return bodyTypeId; + } + + public void setBodyTypeId(Integer bodyTypeId) { + this.bodyTypeId = bodyTypeId; + } + + public String getAnalogue() { + return analogue; + } + + public void setAnalogue(String analogue) { + this.analogue = analogue; + } + + public String getDocURL() { + return docURL; + } + + public void setDocURL(String docURL) { + this.docURL = docURL; + } + + public Integer getEdIzmId() { + return edIzmId; + } + + public void setEdIzmId(Integer edIzmId) { + this.edIzmId = edIzmId; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getNotes() { + return notes; + } + + public void setNotes(String notes) { + this.notes = notes; + } + + public Integer getIDShop() { + return iDShop; + } + + public void setIDShop(Integer iDShop) { + this.iDShop = iDShop; + } + +} \ No newline at end of file diff --git a/app/src/main/java/ru/volgorobot/vrcatalog/model/FirstLevelModel.java b/app/src/main/java/ru/volgorobot/vrcatalog/model/FirstLevelModel.java new file mode 100644 index 0000000..32af26a --- /dev/null +++ b/app/src/main/java/ru/volgorobot/vrcatalog/model/FirstLevelModel.java @@ -0,0 +1,69 @@ +package ru.volgorobot.vrcatalog.model; + + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +public class FirstLevelModel { + + @SerializedName("Description") + @Expose + private Object description; + + @SerializedName("Name") + @Expose + private String name; + + @SerializedName("ID") + @Expose + private Integer iD; + + @SerializedName("Enable") + @Expose + private Boolean enable; + + public FirstLevelModel() { + // Empty constructor + } + + public FirstLevelModel(Object description, String name, Integer iD, Boolean enable) { + super(); + this.description = description; + this.name = name; + this.iD = iD; + this.enable = enable; + } + + public Object getDescription() { + return description; + } + + public void setDescription(Object description) { + this.description = description; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getID() { + return iD; + } + + public void setID(Integer iD) { + this.iD = iD; + } + + public Boolean getEnable() { + return enable; + } + + public void setEnable(Boolean enable) { + this.enable = enable; + } + +} \ No newline at end of file diff --git a/app/src/main/java/ru/volgorobot/vrcatalog/model/SecondLevelModel.java b/app/src/main/java/ru/volgorobot/vrcatalog/model/SecondLevelModel.java new file mode 100644 index 0000000..eb42937 --- /dev/null +++ b/app/src/main/java/ru/volgorobot/vrcatalog/model/SecondLevelModel.java @@ -0,0 +1,67 @@ +package ru.volgorobot.vrcatalog.model; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; + +public class SecondLevelModel { + + @SerializedName("ID") + @Expose + private Integer iD; + + @SerializedName("DetailTypeId") + @Expose + private Integer detailTypeId; + + @SerializedName("Description") + @Expose + private Object description; + + @SerializedName("Name") + @Expose + private String name; + + public SecondLevelModel() { + // Empty constructor + } + + public SecondLevelModel(Integer iD, Integer detailTypeId, Object description, String name) { + this.iD = iD; + this.detailTypeId = detailTypeId; + this.description = description; + this.name = name; + } + + public Integer getID() { + return iD; + } + + public void setID(Integer iD) { + this.iD = iD; + } + + public Integer getDetailTypeId() { + return detailTypeId; + } + + public void setDetailTypeId(Integer detailTypeId) { + this.detailTypeId = detailTypeId; + } + + public Object getDescription() { + return description; + } + + public void setDescription(Object description) { + this.description = description; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + +} \ No newline at end of file