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

import com.zhongshu.card.client.type.DataState;
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.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 设备权限 规则 设置数据
 *
 * @author TRX
 * @date 2024/12/19
 */
@Data
@Document
@NoArgsConstructor
@AllArgsConstructor
public class PermissSetting extends SuperMain {

    @Schema(description = "名称")
    private String name;

    @Schema(description = "关联的时间段")
    @DBRef(lazy = true)
    private PermissTimeSlot timeSlot;

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

    @Schema(description = "数据状态")
    private DataState state = DataState.Enable;
}

