diff --git a/STDatabase/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/transfers/ContainerDB.kt b/STDatabase/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/transfers/ContainerDB.kt index 37857021..d77cf9d4 100644 --- a/STDatabase/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/transfers/ContainerDB.kt +++ b/STDatabase/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/transfers/ContainerDB.kt @@ -26,17 +26,17 @@ import io.realm.kotlin.types.annotations.PrimaryKey class ContainerDB : Container<RealmList<FileDB>>, RealmObject { @PrimaryKey override var uuid: String = "" - override var duration: Long = 0 - override var createdDateTimestamp: Long = 0 - override var expiredDateTimestamp: Long = 0 - override var numberOfFile: Long = 0 + override var duration: Long = 0L + override var createdDateTimestamp: Long = 0L + override var expiredDateTimestamp: Long = 0L + override var numberOfFile: Long = 0L override var message: String? = "" - override var needPassword: Long = 0 // TODO: Boolean ? + override var needPassword: Long = 0L // TODO: Boolean ? override var lang: String = "" - override var sizeUploaded: Long = 0 + override var sizeUploaded: Long = 0L override var deletedDateTimestamp: Long? = null - override var swiftVersion: Long = 0 - override var downloadLimit: Long = 0 + override var swiftVersion: Long = 0L + override var downloadLimit: Long = 0L override var source: String = "" // @SerialName("WSUser") TODO: What's it ? diff --git a/STDatabase/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/transfers/FileDB.kt b/STDatabase/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/transfers/FileDB.kt index d5742c30..877e96a3 100644 --- a/STDatabase/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/transfers/FileDB.kt +++ b/STDatabase/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/transfers/FileDB.kt @@ -26,13 +26,13 @@ class FileDB : File, RealmObject { override var containerUUID: String = "" override var uuid: String = "" override var fileName: String = "" - override var fileSizeInBytes: Long = 0 - override var downloadCounter: Long = 0 - override var createdDateTimestamp: Long = 0 - override var expiredDateTimestamp: Long = 0 + override var fileSizeInBytes: Long = 0L + override var downloadCounter: Long = 0L + override var createdDateTimestamp: Long = 0L + override var expiredDateTimestamp: Long = 0L override var eVirus: String = "" override var deletedDate: String? = null override var mimeType: String = "" - override var receivedSizeInBytes: Long = 0 + override var receivedSizeInBytes: Long = 0L override var path: String? = "" } diff --git a/STDatabase/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/transfers/TransferDB.kt b/STDatabase/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/transfers/TransferDB.kt index 677299d8..bf7014de 100644 --- a/STDatabase/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/transfers/TransferDB.kt +++ b/STDatabase/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/transfers/TransferDB.kt @@ -25,10 +25,10 @@ class TransferDB : Transfer<ContainerDB?>, RealmObject { @PrimaryKey override var linkUUID: String = "" override var containerUUID: String = "" - override var downloadCounterCredit: Long = 0 - override var createdDateTimestamp: Long = 0 - override var expiredDateTimestamp: Long = 0 - override var isDownloadOnetime: Long = 0 // TODO: Boolean ? + override var downloadCounterCredit: Long = 0L + override var createdDateTimestamp: Long = 0L + override var expiredDateTimestamp: Long = 0L + override var isDownloadOnetime: Long = 0L // TODO: Boolean ? override var isMailSent: Boolean = false override var downloadHost: String = "" override var container: ContainerDB? = null diff --git a/STDatabase/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/upload/Upload.kt b/STDatabase/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/upload/Upload.kt index f24603e3..cecef33b 100644 --- a/STDatabase/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/upload/Upload.kt +++ b/STDatabase/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/models/upload/Upload.kt @@ -23,6 +23,6 @@ import io.realm.kotlin.types.RealmObject * Class representing files to be uploaded */ class Upload : RealmObject { - var userId: Long = 0 + var userId: Long = 0L //TODO: implement } diff --git a/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/transfer/ContainerApi.kt b/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/transfer/ContainerApi.kt index 87f89111..7b487251 100644 --- a/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/transfer/ContainerApi.kt +++ b/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/transfer/ContainerApi.kt @@ -27,26 +27,26 @@ class ContainerApi : Container<List<FileApi>> { @SerialName("UUID") override var uuid: String = "" - override var duration: Long = 0 + override var duration: Long = 0L @SerialName("createdDate") @Serializable(DateToTimestampSerializer::class) - override var createdDateTimestamp: Long = 0 + override var createdDateTimestamp: Long = 0L @SerialName("expiredDate") @Serializable(DateToTimestampSerializer::class) - override var expiredDateTimestamp: Long = 0 - override var numberOfFile: Long = 0 + override var expiredDateTimestamp: Long = 0L + override var numberOfFile: Long = 0L override var message: String? = null - override var needPassword: Long = 0 + override var needPassword: Long = 0L override var lang: String = "" - override var sizeUploaded: Long = 0 + override var sizeUploaded: Long = 0L @SerialName("deletedDate") @Serializable(DateToTimestampSerializer::class) override var deletedDateTimestamp: Long? = null - override var swiftVersion: Long = 0 - override var downloadLimit: Long = 0 + override var swiftVersion: Long = 0L + override var downloadLimit: Long = 0L override var source: String = "ST" // @SerialName("WSUser") TODO: What's it ? diff --git a/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/transfer/FileApi.kt b/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/transfer/FileApi.kt index 4526a906..7cd149e1 100644 --- a/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/transfer/FileApi.kt +++ b/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/transfer/FileApi.kt @@ -29,19 +29,19 @@ class FileApi : File { @SerialName("UUID") override var uuid: String = "" override var fileName: String = "" - override var fileSizeInBytes: Long = 0 - override var downloadCounter: Long = 0 + override var fileSizeInBytes: Long = 0L + override var downloadCounter: Long = 0L @SerialName("createdDate") @Serializable(DateToTimestampSerializer::class) - override var createdDateTimestamp: Long = 0 + override var createdDateTimestamp: Long = 0L @SerialName("expiredDate") @Serializable(DateToTimestampSerializer::class) - override var expiredDateTimestamp: Long = 0 + override var expiredDateTimestamp: Long = 0L override var eVirus: String = "" override var deletedDate: String? = null override var mimeType: String = "" - override var receivedSizeInBytes: Long = 0 + override var receivedSizeInBytes: Long = 0L override var path: String? = null } diff --git a/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/transfer/TransferApi.kt b/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/transfer/TransferApi.kt index df7a6453..66a25548 100644 --- a/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/transfer/TransferApi.kt +++ b/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/transfer/TransferApi.kt @@ -27,16 +27,16 @@ import kotlinx.serialization.Serializable class TransferApi : Transfer<ContainerApi> { override var linkUUID: String = "" override var containerUUID: String = "" - override var downloadCounterCredit: Long = 0 + override var downloadCounterCredit: Long = 0L @SerialName("createdDate") @Serializable(DateToTimestampSerializer::class) - override var createdDateTimestamp: Long = 0 + override var createdDateTimestamp: Long = 0L @SerialName("expiredDate") @Serializable(DateToTimestampSerializer::class) - override var expiredDateTimestamp: Long = 0 - override var isDownloadOnetime: Long = 0 + override var expiredDateTimestamp: Long = 0L + override var isDownloadOnetime: Long = 0L @Serializable(with = IntToBooleanSerializer::class) override var isMailSent: Boolean = false diff --git a/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/request/InitUploadBody.kt b/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/request/InitUploadBody.kt index 9c183ff0..79a42a1d 100644 --- a/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/request/InitUploadBody.kt +++ b/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/request/InitUploadBody.kt @@ -25,11 +25,11 @@ class InitUploadBody( val authorEmail: String = "", val password: String = "", val message: String = "", - val sizeOfUpload: Long = 0, + val sizeOfUpload: Long = 0L, val numberOfDownload: Int = 0, val numberOfFile: Int = 0, val recaptcha: String = "", - val recaptchaVersion: Long = 0, + val recaptchaVersion: Long = 0L, val lang: String = "", val files: List<UploadFileRequest> = emptyList(), val recipientsEmails: String = "", diff --git a/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/request/UploadFileRequest.kt b/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/request/UploadFileRequest.kt index 89cc7578..f82d57d0 100644 --- a/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/request/UploadFileRequest.kt +++ b/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/request/UploadFileRequest.kt @@ -22,6 +22,6 @@ import kotlinx.serialization.Serializable @Serializable data class UploadFileRequest( val name: String = "", - val size: Long = 0, + val size: Long = 0L, val type: String = "", ) diff --git a/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/response/UploadCompleteResponse.kt b/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/response/UploadCompleteResponse.kt index b659d39f..cf5d1dcb 100644 --- a/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/response/UploadCompleteResponse.kt +++ b/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/response/UploadCompleteResponse.kt @@ -27,13 +27,13 @@ class UploadCompleteResponse( var linkUUID: String = "", var containerUUID: String = "", var userEmail: String? = null, - var downloadCounterCredit: Long = 0, + var downloadCounterCredit: Long = 0L, @SerialName("createdDate") @Serializable(DateToTimestampSerializer::class) - var createdDateTimestamp: Long = 0, + var createdDateTimestamp: Long = 0L, @SerialName("expiredDate") @Serializable(DateToTimestampSerializer::class) - var expiredDateTimestamp: Long = 0, + var expiredDateTimestamp: Long = 0L, @Serializable(with = IntToBooleanSerializer::class) var isDownloadOnetime: Boolean = false, @Serializable(with = IntToBooleanSerializer::class) diff --git a/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/response/UploadContainerApi.kt b/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/response/UploadContainerApi.kt index 91c5d060..62078cb5 100644 --- a/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/response/UploadContainerApi.kt +++ b/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/response/UploadContainerApi.kt @@ -28,7 +28,7 @@ class UploadContainerApi : UploadContainer { override var uuid: String = "" override var duration: String = "" - override var downloadLimit: Long = 0 + override var downloadLimit: Long = 0L override var lang: String = "" override var source: String = "" @@ -41,9 +41,9 @@ class UploadContainerApi : UploadContainer { // var createdDate: String // TODO: Why a complex date instead of a simple date ? May be Custom serial this @SerialName("expiredDate") @Serializable(DateToTimestampSerializer::class) - override var expiredDateTimestamp: Long = 0 + override var expiredDateTimestamp: Long = 0L override var needPassword: Boolean = false override var message: String = "" @SerialName("numberOfFile") - override var numberOfFiles: Long = 0 + override var numberOfFiles: Long = 0L }