1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| package com.example.firstapp.database.entity
|
| import androidx.room.Entity
| import androidx.room.PrimaryKey
| import java.util.*
|
| @Entity(tableName = "Code")
| data class Code(
| @PrimaryKey(autoGenerate = true) val id: Long = 0, // 自增长的 id
| val category: String,
| val categoryId: Long,
| val type: String,
| val typeId: Long,
| val ruleId: Long,
| val msgId: Long,
| val code: String,
| var overtime: String,
| var name: String,
| var time: Date = Date(),
|
| )
|
|