namespace Health.Infrastructure.Data;

/// <summary>
/// 数据库种子数据
/// </summary>
public static class DataSeeder
{
    public static async Task SeedAsync(AppDbContext db)
    {
        // 种子医生数据
        if (!db.Doctors.Any())
        {
            db.Doctors.AddRange(
                new Doctor
                {
                    Id = Guid.NewGuid(),
                    Name = "王建国",
                    Title = "主任医师",
                    Department = "心血管内科",
                    Introduction = "擅长冠心病术后管理、心脏康复指导",
                    IsActive = true
                },
                new Doctor
                {
                    Id = Guid.NewGuid(),
                    Name = "李芳",
                    Title = "副主任医师",
                    Department = "营养科",
                    Introduction = "擅长术后营养指导、膳食规划",
                    IsActive = true
                },
                new Doctor
                {
                    Id = Guid.NewGuid(),
                    Name = "张明",
                    Title = "主任医师",
                    Department = "心脏康复科",
                    Introduction = "擅长心脏术后运动康复、心肺功能评估",
                    IsActive = true
                }
            );
            await db.SaveChangesAsync();
        }
    }
}
