package com.zhongshu.card.server.core.domain.school;

import com.zhongshu.card.client.type.CardOperationType;
import com.zhongshu.card.server.core.domain.base.SuperMain;
import com.zhongshu.card.server.core.domain.org.UserAccount;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.checkerframework.common.aliasing.qual.NonLeaked;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 挂失记录
 *
 * @author TRX
 * @date 2024/6/13
 */
@Data
@Document
@AllArgsConstructor
@NoArgsConstructor
@NonLeaked
public class CardInfoLossRecord extends SuperMain {

    @Schema(description = "卡片信息")
    @DBRef(lazy = true)
    private CardInfo cardInfo;

    @Schema(description = "操作挂失、解挂的用户信息")
    @DBRef(lazy = true)
    private UserAccount operUserAccount;

    @Schema(description = "操作挂失、解挂的用户userId")
    private String operUserId;

    @Schema(description = "卡片挂失、解挂的用户信息")
    @DBRef(lazy = true)
    private UserAccount cardUserAccount;

    @Schema(description = "卡片挂失、解挂的用户userId")
    private String cardUserId;

    @Schema(description = "操作类型")
    CardOperationType operationType;

}
