using System.Collections.Generic;
using System.Linq;
using AutoBogus;
using Util.Tests.Models;
namespace Util.Tests.Fakes;
///
/// 订单模拟数据服务
///
public static class OrderFakeService {
///
/// 获取订单
///
public static Order GetOrder() {
return GetOrders( 1 ).First();
}
///
/// 获取订单列表
///
/// 行数
public static List GetOrders( int count ) {
return new AutoFaker()
.Ignore( t => t.OrderItems )
.RuleFor( t => t.IsDeleted, false )
.Generate( count );
}
}