Finalize the Expense class and add an Enum for the rate.
This commit is contained in:
parent
49eb36514d
commit
845715122f
@ -1,23 +1,13 @@
|
|||||||
package com.hyperling.expensetracker
|
package com.hyperling.expensetracker
|
||||||
|
|
||||||
/*class Expense {
|
import androidx.room.Entity
|
||||||
var name: String = ""
|
import androidx.room.PrimaryKey
|
||||||
var cost: Double = 0.0
|
|
||||||
var freq: Char = '*'
|
|
||||||
var note: String = ""
|
|
||||||
|
|
||||||
/*public Expense (val name: String, val cost: Double, val freq: Char, val note: String) {
|
@Entity
|
||||||
this.name = name
|
data class Expense (
|
||||||
this.name = name
|
val name: String,
|
||||||
this.name = name
|
val cost: Double,
|
||||||
this.name = name
|
val rate: Enum<Rate>,
|
||||||
}*/
|
@PrimaryKey(autoGenerate = true)
|
||||||
}*/
|
val ID: Int = 0,
|
||||||
|
)
|
||||||
class Expense (
|
|
||||||
var name: String = "",
|
|
||||||
var cost: Double = 0.0,
|
|
||||||
var freq: Char = '*',
|
|
||||||
var note: String = "",
|
|
||||||
) {
|
|
||||||
}
|
|
8
app/src/main/java/com/hyperling/expensetracker/Rate.kt
Normal file
8
app/src/main/java/com/hyperling/expensetracker/Rate.kt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
package com.hyperling.expensetracker
|
||||||
|
|
||||||
|
enum class Rate {
|
||||||
|
DAILY,
|
||||||
|
WEEKLY,
|
||||||
|
MONTHLY,
|
||||||
|
YEARLY,
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user