-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
59 changed files
with
205 additions
and
311 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.katan.model.io | ||
|
||
import kotlinx.datetime.Instant | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
@SerialName("file") | ||
data class File( | ||
override val name: String, | ||
override val relativePath: String, | ||
override val absolutePath: String, | ||
override val size: Long, | ||
override val isHidden: Boolean, | ||
override val createdAt: Instant?, | ||
override val modifiedAt: Instant?, | ||
) : FileLike { | ||
|
||
override val isDirectory: Boolean get() = false | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package org.katan.model.io | ||
|
||
import kotlinx.datetime.Instant | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
sealed interface FileLike { | ||
|
||
val name: String | ||
|
||
val relativePath: String | ||
|
||
val absolutePath: String | ||
|
||
val size: Long | ||
|
||
val isDirectory: Boolean | ||
|
||
val isHidden: Boolean | ||
|
||
val createdAt: Instant? | ||
|
||
val modifiedAt: Instant? | ||
} | ||
|
||
val FileLike.extension: String | ||
get() = name.substringAfterLast(".", "") | ||
|
||
fun FileLike( | ||
name: String, | ||
relativePath: String, | ||
absolutePath: String, | ||
size: Long, | ||
isHidden: Boolean, | ||
createdAt: Instant?, | ||
modifiedAt: Instant?, | ||
children: List<FileLike>?, | ||
): FileLike = if (children != null) { | ||
Directory( | ||
name = name, | ||
relativePath = relativePath, | ||
absolutePath = absolutePath, | ||
size = size, | ||
isHidden = isHidden, | ||
createdAt = createdAt ?: modifiedAt, | ||
modifiedAt = modifiedAt, | ||
children = children, | ||
) | ||
} else { | ||
File( | ||
name = name, | ||
relativePath = relativePath, | ||
absolutePath = absolutePath, | ||
size = size, | ||
isHidden = isHidden, | ||
createdAt = createdAt ?: modifiedAt, | ||
modifiedAt = modifiedAt, | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
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
18 changes: 0 additions & 18 deletions
18
services/account-service/src/main/kotlin/org/katan/service/account/AccountImpl.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.