I have data class
data class User(
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
val userId: Long = 0,
@Column(nullable = false, unique = true)
val email: String = "",
@Column(nullable = false)
val firstName: String = "",
)
I hate using "" for initialization. I would like use something like
@Column(nullable = false)
val firstName: String = String.EMPTY
I know about extension properties or functions, but they looks aren't so good as well
val firstName: String = "".empty()
val firstName: String = "".EMPTY
How do you write entity classes? Is there more elegant way?