package com.zhongshu.card.client.model.devices.deviceProduct;

import com.zhongshu.card.client.model.base.SuperModel;
import com.zhongshu.card.client.type.DataState;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * @author TRX
 * @date 2025/1/8
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DeviceProductProvideServeModel extends SuperModel {

    private String deviceProductId;

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

    @Schema(description = "价格")
    private BigDecimal price = BigDecimal.ZERO;

    @Schema(description = "其他参数")
    private Object param;

    @Schema(description = "状态")
    private DataState state;

    private String stateStr;

    public String getStateStr() {
        if (state != null) {
            return state.getRemark();
        }
        return "";
    }

}
