package top.tqx.demo_1.service;

import top.tqx.demo_1.dto.FilePermissionRequest;
import top.tqx.demo_1.entity.FilePermission;
import top.tqx.demo_1.entity.User;

import java.time.LocalDateTime;
import java.util.List;

public interface FilePermissionService {

    boolean checkFilePermission(Long userId, Long fileId, Integer requiredPermission);

    void grantFilePermission(FilePermissionRequest request);

    void revokeFilePermission(Long permissionId);

    void updatePermissionExpire(Long permissionId, LocalDateTime expireTime);

    List<FilePermission> getUserFilePermissions(Long userId, Long fileId);

    List<User> getFileAuthorizedUsers(Long fileId);
}
