Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model clean up #1549

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.mifos.mobilewallet.model.domain

import android.os.Parcel
import android.os.Parcelable
import kotlinx.parcelize.Parcelize

Expand All @@ -13,4 +12,4 @@ data class Account(
var id: Long=0L,
var productId: Long=0L,
var currency: Currency,
) : Parcelable
) : Parcelable
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.mifos.mobilewallet.model.domain

import android.os.Parcel
import android.os.Parcelable
import kotlinx.parcelize.Parcelize

Expand All @@ -15,4 +14,4 @@ data class BankAccountDetails(
var upiPin: String?=null
) : Parcelable {
constructor() : this("", "", "", "", "", false, "")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.mifos.mobilewallet.model.domain
import android.os.Parcelable
import kotlinx.parcelize.Parcelize


@Parcelize
data class Currency(
var code: String,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.mifos.mobilewallet.model.domain

import java.util.Date

data class NewAccount(
var clientId: Int,
var productId: String? = null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.mifos.mobilewallet.model.domain

import android.os.Parcel
import android.os.Parcelable
import kotlinx.parcelize.Parcelize

Expand All @@ -9,6 +8,4 @@ data class NotificationPayload(
var title: String? = null,
var body: String? = null,
var timestamp: String? = null
) : Parcelable {
constructor() : this("", "", "")
}
) : Parcelable
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package com.mifos.mobilewallet.model.domain

import android.os.Parcel
import android.os.Parcelable
import kotlinx.parcelize.Parcelize


@Parcelize
data class SearchResult(
var resultId: Int = 0,
var resultName: String,
var resultType: String
) : Parcelable {
constructor() : this(0, "", "")
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package com.mifos.mobilewallet.model.domain

import android.os.Parcel
import android.os.Parcelable
import com.mifos.mobilewallet.model.domain.Currency
import com.mifos.mobilewallet.model.domain.TransactionType
import com.mifos.mobilewallet.model.entity.accounts.savings.TransferDetail
import kotlinx.parcelize.Parcelize

Expand All @@ -19,5 +16,17 @@ data class Transaction(
var transferId: Long = 0,
var transferDetail: TransferDetail = TransferDetail(),
var receiptId: String? = null
) : Parcelable {
constructor() : this("", 0, 0, 0.0, "", Currency(), TransactionType.OTHER, 0, TransferDetail(), "")}
) : Parcelable {
constructor() : this(
"",
0,
0,
0.0,
"",
Currency(),
TransactionType.OTHER,
0,
TransferDetail(),
""
)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.mifos.mobilewallet.model.domain.client

import android.os.Parcel
import android.os.Parcelable
import kotlinx.parcelize.Parcelize

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.mifos.mobilewallet.model.domain.twofactor

import android.os.Parcel
import android.os.Parcelable
import kotlinx.parcelize.Parcelize

Expand All @@ -9,7 +8,5 @@ data class AccessToken(
var token: String? = null,
var validFrom: Long? = null,
var validTo: Long? = null
) : Parcelable{
constructor(): this("", 0L, 0L)
}
) : Parcelable

Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package com.mifos.mobilewallet.model.domain.twofactor

import android.os.Parcel
import android.os.Parcelable
import kotlinx.parcelize.Parcelize

@Parcelize
data class DeliveryMethod(
var name: String?,
var target: String?
) : Parcelable{
constructor() : this("", "")
}
) : Parcelable
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.mifos.mobilewallet.model.domain.user

/**
* Created by ankur on 25/June/2018
*/
data class UpdateUserEntityClients(
var clients: ArrayList<Int>
)
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.mifos.mobilewallet.model.domain.user

/**
* Created by ankur on 27/June/2018
*/
data class UpdateUserEntityEmail(
var email: String?
)
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
package com.mifos.mobilewallet.model.domain.user

/**
* Created by ankur on 27/June/2018
*/
class UpdateUserEntityPassword(private val password: String) {
private val repeatPassword: String

init {
repeatPassword = password
}
data class UpdateUserEntityPassword(val password: String) {
val repeatPassword: String = password
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.mifos.mobilewallet.model.domain.user

import android.os.Parcel
import android.os.Parcelable
import kotlinx.parcelize.Parcelize

Expand Down
Original file line number Diff line number Diff line change
@@ -1,43 +1,40 @@
package com.mifos.mobilewallet.model.entity

import android.os.Parcel
import android.os.Parcelable
import com.google.gson.annotations.SerializedName
import kotlinx.parcelize.Parcelize
import kotlinx.parcelize.RawValue

/**
* Created by ankur on 07/June/2018
*/
@Parcelize
data class Invoice (
data class Invoice(

@SerializedName("consumerId")
var consumerId: String?=null,
var consumerId: String? = null,

@SerializedName("consumerName")
var consumerName: String?=null,
var consumerName: String? = null,

@SerializedName("amount")
var amount: Double=0.0,
var amount: Double = 0.0,

@SerializedName("itemsBought")
var itemsBought: String?=null,
var itemsBought: String? = null,

@SerializedName("status")
var status: Long=0L,
var status: Long = 0L,

@SerializedName("transactionId")
var transactionId: String?=null,
var transactionId: String? = null,

@SerializedName("id")
var id: Long=0L,
var id: Long = 0L,

@SerializedName("title")
var title: String?=null,
var title: String? = null,

@SerializedName("date")
var date : @RawValue MutableList<Int> = ArrayList()
var date: @RawValue MutableList<Int> = ArrayList()

): Parcelable {
) : Parcelable {
constructor() : this(null, null, 0.0, null, 0L, null, 0L, null, ArrayList())
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
package com.mifos.mobilewallet.model.entity

/**
* @author Rajan Maurya
*/
data class Page<T> (
data class Page<T>(
var totalFilteredRecords: Int = 0,
@JvmField
var pageItems: MutableList<T> = ArrayList()

)
)
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
package com.mifos.mobilewallet.model.entity

import android.os.Parcel
import android.os.Parcelable
import kotlinx.parcelize.Parcelize

/**
* Created by ankur on 11/June/2018
*/

@Parcelize
data class Role (
var id: String?=null,
data class Role(
var id: String? = null,
@JvmField
var name: String?=null,
var description: String?=null,
): Parcelable{
constructor():this(null,null,null)
}
var name: String? = null,
var description: String? = null,
) : Parcelable
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
package com.mifos.mobilewallet.model.entity

import android.os.Parcel
import android.os.Parcelable
import kotlinx.parcelize.Parcelize


@Parcelize
data class SearchedEntity (
@JvmField
data class SearchedEntity(
var entityId: Int = 0,
var entityAccountNo: String= " ",
@JvmField
var entityName: String= " ",
@JvmField
var entityType: String= " ",
var entityAccountNo: String = " ",
var entityName: String = " ",
var entityType: String = " ",
var parentId: Int = 0,
var parentName: String= " "
): Parcelable{
constructor() : this(0, "", "", "", 0, "")
}
var parentName: String = " "
) : Parcelable
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
package com.mifos.mobilewallet.model.entity

import android.os.Parcel
import android.os.Parcelable
import kotlinx.parcelize.Parcelize

/**
* Created by ankur on 18/June/2018
*/

@Parcelize
data class TPTResponse (
var savingsId: String?=null,
var resourceId: String?=null,
): Parcelable{
constructor():this(null,null)
}
data class TPTResponse(
var savingsId: String? = null,
var resourceId: String? = null,
) : Parcelable
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
package com.mifos.mobilewallet.model.entity

import android.os.Parcel
import android.os.Parcelable
import kotlinx.parcelize.Parcelize

/**
* Created by ishankhanna for mifos android-client on 09/02/14.
* Created by michaelsosnick on 1/20/17.
*/
/*
* This project is licensed under the open source MPL V2.
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
*/

@Parcelize
data class Timeline (
data class Timeline(
var submittedOnDate: List<Int?> = ArrayList(),
var submittedByUsername: String? = null,
var submittedByFirstname: String? = null,
Expand All @@ -26,7 +16,7 @@ data class Timeline (
var closedOnDate: List<Int?> = ArrayList(),
var closedByUsername: String? = null,
var closedByFirstname: String? = null,
var closedByLastname: String? = null,
): Parcelable{
constructor():this(ArrayList(),"","","",ArrayList(),"","","",ArrayList(),"","","")
var closedByLastname: String? = null
) : Parcelable {
constructor() : this(ArrayList(), "", "", "", ArrayList(), "", "", "", ArrayList(), "", "", "")
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.mifos.mobilewallet.model.entity

data class UserEntity (
@JvmField
data class UserEntity(
val userId: Long = 0,
val isAuthenticated: Boolean = false,
val userName: String? = null,
@JvmField
val base64EncodedAuthenticationKey: String? = null,
val permissions: List<String> = ArrayList()
)
Loading
Loading