import { branch, BranchTypeTest } from "@/api";

/**下级代理列表模型 */
export class MyBranchListModel {
	private api = branch.spreadRelationList;

	async getData() {
		const res = await this.api();
		return res.data.data;
	}
}

/**代理模型 */
export class BranchModel {
	private api = branch;

	async getIntegralList() {
		const { data } = await this.api.integralList();
		return data.data;
	}

	async integralSettlement(params: BranchTypeTest.IntegralSettlementParams) {
		const { data } = await this.api.integralSettlement(params);
		return data;
	}
}
