package com.framework.mvvm.model.db.entity

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey

@Entity(tableName = "user")
class UserEntity(
    // @PrimaryKey(autoGenerate = true) var id: Int = 0,      // id
    @PrimaryKey @ColumnInfo(name = "user_id") val userId: String,      // 用户ID
    @ColumnInfo(name = "username") val username: String,   // 用户名
    @ColumnInfo(name = "password") val password: String,   // 用户密码
    @ColumnInfo(name = "pd") val pd: String,               //
    @ColumnInfo(name = "device") val device: String,       // 登录设备
    @ColumnInfo(name = "is_admin") val isAdmin: String?,   // 是否是管理员
    @ColumnInfo(name = "mail") val mail: String?,          // 邮件
    @ColumnInfo(name = "phone") val phone: String?,        // 电话
    @ColumnInfo(name = "from") val from: String?,
    @ColumnInfo(name = "state") var state: Int             // 登录状态 0 未登录, 1 登录
)