package com.red.circle.other.infra.database.rds.service.family;

import com.red.circle.framework.mybatis.service.BaseService;
import com.red.circle.other.infra.database.rds.entity.family.FamilyNews;
import com.red.circle.other.infra.enums.family.FamilyNewsTypeEnum;
import java.util.List;

/**
 * 家族动态服务
 */
public interface FamilyNewsService extends BaseService<FamilyNews> {

  /**
   * 记录家族动态
   */
  void recordNews(
      String sysOrigin,
      Long familyId,
      FamilyNewsTypeEnum newsType,
      Long operatorId,
      String operatorName,
      Long targetUserId,
      String targetUserName
  );

  /**
   * 查询家族动态列表（最新100条）
   */
  List<FamilyNews> listByFamilyId(Long familyId, Integer limit);

  /**
   * 获取最新一条动态
   */
  FamilyNews getLatestNews(Long familyId);

  /**
   * 删除家族所有动态
   */
  void deleteByFamilyId(Long familyId);
}
