package com.tenlionsoft.baselib.core.db.daos;

import com.tenlionsoft.baselib.core.db.beans.FoodFoodBean;
import com.tenlionsoft.baselib.core.db.beans.FoodSubscribeFoodBean;
import com.tenlionsoft.baselib.core.db.beans.UserAccountBean;

import java.util.List;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

/**
 * 作者: adam
 * 日期: 2022/3/28 - 4:47 下午
 * 邮箱: itgaojian@163.com
 * 描述:
 */
@Dao
public interface UserAccountDao {
    /**
     * 插入多个菜品
     */
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(UserAccountBean... beans);

    /**
     * 批量添加
     */
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insertAll(List<UserAccountBean> beans);
    /**
     * 获取用户表中最后一条数据
     */
    @Query("SELECT * FROM user_account ORDER BY sync_number DESC LIMIT 1")
    UserAccountBean getLastOne();
}
