package com.zhongshu.card.server.core.domain.devices.permiss;

import com.zhongshu.card.server.core.domain.base.SuperMain;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * @author TRX
 * @date 2024/12/27
 */
@Data
@Document
@NoArgsConstructor
@AllArgsConstructor
public class UserPermissDataCache extends SuperMain {

    @Indexed
    @Schema(description = "关联的数据ID")
    private String dataId;

    @Schema(description = "关联的数据名称")
    private String dataName;

    @Schema(description = "用户数据")
    private Object cacheData;

    @Indexed(expireAfterSeconds = 0)
    private Date TTL;

}
