Created
January 10, 2022 02:04
-
-
Save ParkSangGwon/b2829602aa2390fe25a3179d99cb9dc5 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
sealed class User(open val name: String) { | |
data class Customer( | |
override val name: String, | |
val address: String, | |
val phoneNumber: String | |
) : User(name) | |
data class Store( | |
override val name: String, | |
val address: String, | |
val businessNumber: String | |
) : User(name) | |
data class Admin( | |
override val name: String, | |
val department: String | |
) : User(name) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment