4
This commit is contained in:
parent
56b1e815c6
commit
89fee0d2c6
@ -0,0 +1,9 @@
|
||||
package com.example.myapplication.database.repository
|
||||
|
||||
import com.example.myapplication.database.entities.Category
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
interface CategoryRepository {
|
||||
fun getAll(): Flow<List<Category>>
|
||||
suspend fun insert(category: Category)
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package com.example.myapplication.database.repository
|
||||
|
||||
interface ProductRepository {
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.example.myapplication.database.repository
|
||||
|
||||
import com.example.myapplication.database.entities.User
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
interface UserRepository {
|
||||
fun getAll(): Flow<List<User>>
|
||||
fun getById(id: Int): Flow<User>
|
||||
fun getByAuth(login: String, password: String): Flow<User?>
|
||||
fun getUserItemsCartById(id: Int): Flow<UserWithCartItems>
|
||||
suspend fun deleteCartItem(userId: Int, itemId: Int)
|
||||
suspend fun deleteFavoriteItem(userId: Int, itemId: Int)
|
||||
suspend fun insert(user: User)
|
||||
suspend fun addItemCart(userItem: UserItemCart)
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user