cloudroam
2025-04-03 97745e7ad15fb3d175f81dfdd2f24269e8fdfefd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.example.firstapp.model
 
import androidx.room.DatabaseView
import androidx.room.ColumnInfo
 
@DatabaseView(
    """
    SELECT substr(createTime, 1, 10) as date, 
           COUNT(*) as count 
    FROM code 
    GROUP BY substr(createTime, 1, 10)
    """
)
data class DailyStat(
    val date: String,
    val count: Int,
    @ColumnInfo(name = "weekStart")
    val weekStart: String? = null
)