Created
August 3, 2022 14:59
-
-
Save devrath/32d41ff70767f7a5ba49cc85e0329285 to your computer and use it in GitHub Desktop.
user class extending abstract class
This file contains hidden or 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
| /** | |
| * A data model class for User with required fields. | |
| */ | |
| data class User( | |
| override val id: String = "", | |
| override val firstName: String = "", | |
| override val lastName: String = "", | |
| override val email: String = "", | |
| override val image: String = "", | |
| override val mobile: Long = 0, | |
| override val gender: String = "", | |
| override val profileCompleted: Int = 0 | |
| ) : UserAbstract(id,firstName,lastName,email,image,mobile,gender,profileCompleted) | |
| /** | |
| * A abstract data model class for User with required fields. | |
| */ | |
| abstract class UserAbstract( | |
| open val id: String, | |
| open val firstName: String, | |
| open val lastName: String, | |
| open val email: String, | |
| open val image: String, | |
| open val mobile: Long, | |
| open val gender: String, | |
| open val profileCompleted: Int) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment