parent
feca1a1c3d
commit
fb107c7318
@ -1,16 +0,0 @@ |
||||
package com.novel.read.data.db |
||||
|
||||
import com.novel.read.data.db.entity.User |
||||
import org.litepal.LitePal |
||||
import org.litepal.extension.deleteAll |
||||
|
||||
class UserDao { |
||||
|
||||
fun saveUser(user: User) = user.saveOrUpdate("userId=?", user.userId.toString()) |
||||
|
||||
fun getUser(): User? = |
||||
LitePal.findFirst(User::class.java) |
||||
|
||||
fun deleteUser() = LitePal.deleteAll<User>() |
||||
|
||||
} |
@ -1,29 +0,0 @@ |
||||
package com.novel.read.data.db.entity |
||||
|
||||
import org.litepal.crud.LitePalSupport |
||||
import java.io.Serializable |
||||
|
||||
data class User( |
||||
val createTime: Long, |
||||
val email: String, |
||||
val headImageUrl: String, |
||||
val idToken: String, |
||||
val introduction: String?, |
||||
val ip: String, |
||||
val isEmailVerified: Int, |
||||
val lastLoginTime: Long?, |
||||
val nickName: String?, |
||||
val oldNickName: String?, |
||||
val os: String, |
||||
val password: String, |
||||
val phone: String, |
||||
val provider: String, |
||||
val sex: Int, |
||||
val updateTime: Long?, |
||||
val userId: Long, |
||||
val userName: String, |
||||
val validFlag: Int, |
||||
val vipEndTime: Long?, |
||||
val vipStartTime: Long?, |
||||
val vipStatus: Int |
||||
) : LitePalSupport(), Serializable |
@ -1,32 +0,0 @@ |
||||
package com.novel.read.data.model |
||||
|
||||
import com.novel.read.data.db.entity.User |
||||
|
||||
data class UserResp( |
||||
val user: User |
||||
) |
||||
// |
||||
//data class User( |
||||
// val createTime: Long, |
||||
// val email: String, |
||||
// val headImageUrl: String, |
||||
// val idToken: String, |
||||
// val introduction: Any, |
||||
// val ip: String, |
||||
// val isEmailVerified: Int, |
||||
// val lastLoginTime: Any, |
||||
// val nickName: String, |
||||
// val oldNickName: Any, |
||||
// val os: String, |
||||
// val password: String, |
||||
// val phone: String, |
||||
// val provider: String, |
||||
// val sex: Any, |
||||
// val updateTime: Any, |
||||
// val userId: Long, |
||||
// val userName: String, |
||||
// val validFlag: Int, |
||||
// val vipEndTime: Any, |
||||
// val vipStartTime: Any, |
||||
// val vipStatus: Int |
||||
//) |
Loading…
Reference in new issue