package com.tofly.feesapi.common.model;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;

@Data
@NoArgsConstructor
public class CollectionData<T> implements Serializable {
    private int total;
    private Collection<T> records = new ArrayList<>();

    public CollectionData(Collection<T> records, long total) {
        this.records = records;
        this.total = (int) total;
    }
}
