[WIP] - added a field for the persons to hold their password hash
This commit is contained in:
parent
2a70ca1ee2
commit
56330ff7c7
1 changed files with 7 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
package com.faraphel.tasks_valider.database.entities
|
||||
|
||||
import androidx.compose.ui.text.capitalize
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.Entity
|
||||
import androidx.room.PrimaryKey
|
||||
|
@ -12,7 +13,13 @@ data class PersonEntity (
|
|||
@ColumnInfo("first_name") val firstName: String,
|
||||
@ColumnInfo("last_name") val lastName: String,
|
||||
@ColumnInfo("card_id") val cardId: UUID,
|
||||
@ColumnInfo("password_hash") val passwordHash: String
|
||||
) : BaseEntity() {
|
||||
/**
|
||||
* Return the full name of the person
|
||||
*/
|
||||
fun fullName(): String = "${this.firstName.capitalize()} ${this.lastName.uppercase()}"
|
||||
|
||||
companion object {
|
||||
const val TABLE_NAME = "persons"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue