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

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

/**
 * 设备信息
 *
 * @author TRX
 * @date 2025/1/8
 */
@Data
@Document
@NoArgsConstructor
@AllArgsConstructor
public class DeviceProduct extends SuperMain {

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

    @Schema(description = "编码/规则")
    private String code;

    @Schema(description = "设备数量")
    private Long number = 0L;

    @Schema(description = "服务数量")
    private Long serviceNumber = 0L;

    @Schema(description = "所属机构")
    @DBRef(lazy = true)
    private Organization organization;

    @Schema(description = "所属机构oid")
    private String beLongOid;

    @Schema(description = "所属机构name")
    private String beLongName;

    @Schema(description = "交易模式")
    private DataState transaction = DataState.Enable;

    @Schema(description = "设备多订单模式")
    private DataState multipleOrders = DataState.Enable;
}
