package com.zhongshu.card.client.model.payment;

import com.zhongshu.card.client.model.school.AreaSimpleModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.ObjectUtils;

/**
 * @author TRX
 * @date 2024/6/17
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ExpenseFlowAreaModel extends ExpenseFlowModel {

    @Schema(description = "设备所属区域信息")
    private AreaSimpleModel area;

    private String areaName = "";

    public String getAreaName() {
        if (ObjectUtils.isNotEmpty(area)) {
            return area.getName();
        }
        return "";
    }

    @Schema(description = "")
    private String areaNames = "";
}
