diff --git a/app/src/main/java/io/legado/app/data/dao/CookieDao.kt b/app/src/main/java/io/legado/app/data/dao/CookieDao.kt new file mode 100644 index 000000000..93f613ae4 --- /dev/null +++ b/app/src/main/java/io/legado/app/data/dao/CookieDao.kt @@ -0,0 +1,13 @@ +package io.legado.app.data.dao + +import androidx.room.Dao +import androidx.room.Query + +@Dao +interface CookieDao { + + @Query("select * from cookies where url = :url") + fun get(url: String) + + +} \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/data/entities/Cookie.kt b/app/src/main/java/io/legado/app/data/entities/Cookie.kt new file mode 100644 index 000000000..fd1ec1840 --- /dev/null +++ b/app/src/main/java/io/legado/app/data/entities/Cookie.kt @@ -0,0 +1,11 @@ +package io.legado.app.data.entities + +import androidx.room.Entity +import androidx.room.PrimaryKey + +@Entity(tableName = "cookies") +data class Cookie( + @PrimaryKey + var url: String, + var cookie: String +) \ No newline at end of file