[B][+] Create user database model
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package org.hydev.ios.alarmclock.data
|
||||
|
||||
import org.hydev.ios.alarmclock.bad
|
||||
import org.springframework.data.domain.Example
|
||||
import org.springframework.data.domain.ExampleMatcher
|
||||
import org.springframework.data.domain.ExampleMatcher.GenericPropertyMatchers.ignoreCase
|
||||
import org.springframework.data.jpa.repository.JpaRepository
|
||||
import org.springframework.http.ResponseEntity
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RequestParam
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
import javax.persistence.*
|
||||
import javax.validation.constraints.NotNull
|
||||
|
||||
/**
|
||||
* The database model for an user
|
||||
*
|
||||
* @author HyDEV Team (https://github.com/HyDevelop)
|
||||
* @author Hykilpikonna (https://github.com/hykilpikonna)
|
||||
* @author Vanilla (https://github.com/VergeDX)
|
||||
* @since 2021-01-09 10:48
|
||||
*/
|
||||
@Entity
|
||||
data class User(
|
||||
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0,
|
||||
|
||||
@NotNull @Column(length = 32)
|
||||
var name: String,
|
||||
|
||||
@NotNull @Column(length = 128)
|
||||
var passHash: String,
|
||||
)
|
||||
Reference in New Issue
Block a user