1.1
tj
2025-04-09 2b446a5fd5d8f9b8c0f1e3acef1eef7ad9adb6f9
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
)