237 lines
12 KiB
C#
237 lines
12 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using SessionCompanion.Database.Tables;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SessionCompanion.Database
|
|
{
|
|
public class SeedData
|
|
{
|
|
static public List<User> SeedUsers()
|
|
{
|
|
List<User> users = new List<User>
|
|
{
|
|
new User
|
|
{
|
|
Id = 1,
|
|
Username = "Morwiec",
|
|
Password = "123"
|
|
},
|
|
new User
|
|
{
|
|
Id = 2,
|
|
Username = "Cichoklepiec",
|
|
Password = "123"
|
|
},
|
|
new User
|
|
{
|
|
Id = 3,
|
|
Username = "Ruletka",
|
|
Password = "123"
|
|
}
|
|
};
|
|
return users;
|
|
}
|
|
|
|
static public List<Character> SeedCharacter()
|
|
{
|
|
List<Character> characters = new List<Character>
|
|
{
|
|
new Character
|
|
{
|
|
Id = 1,
|
|
UserId = 1,
|
|
},
|
|
new Character
|
|
{
|
|
Id = 2,
|
|
UserId = 2,
|
|
},
|
|
new Character
|
|
{
|
|
Id = 3,
|
|
UserId = 3,
|
|
}
|
|
};
|
|
return characters;
|
|
}
|
|
|
|
static public List<Class> SeedClass()
|
|
{
|
|
List<Class> classes = new List<Class>
|
|
{
|
|
new Class
|
|
{
|
|
Id = 1,
|
|
Name = "Fighter"
|
|
},
|
|
new Class
|
|
{
|
|
Id = 2,
|
|
Name = "Paladin"
|
|
},
|
|
new Class
|
|
{
|
|
Id = 3,
|
|
Name = "Cleric"
|
|
}
|
|
};
|
|
return classes;
|
|
}
|
|
|
|
static public List<Race> SeedRace()
|
|
{
|
|
List<Race> races = new List<Race>
|
|
{
|
|
new Race
|
|
{
|
|
Id = 1,
|
|
Name = "Human"
|
|
},
|
|
new Race
|
|
{
|
|
Id = 2,
|
|
Name = "Dwarf"
|
|
},
|
|
new Race
|
|
{
|
|
Id = 3,
|
|
Name = "Elf"
|
|
}
|
|
};
|
|
return races;
|
|
}
|
|
|
|
static public List<Alignment> SeedAlignment()
|
|
{
|
|
List<Alignment> alignments = new List<Alignment>
|
|
{
|
|
new Alignment
|
|
{
|
|
Id = 1,
|
|
},
|
|
new Alignment
|
|
{
|
|
Id = 2,
|
|
},
|
|
new Alignment
|
|
{
|
|
Id = 3,
|
|
}
|
|
};
|
|
return alignments;
|
|
}
|
|
|
|
static public List<Background> SeedBackground()
|
|
{
|
|
List<Background> backgrounds = new List<Background>
|
|
{
|
|
new Background
|
|
{
|
|
Id = 1,
|
|
},
|
|
new Background
|
|
{
|
|
Id = 2,
|
|
},
|
|
new Background
|
|
{
|
|
Id = 3,
|
|
}
|
|
};
|
|
return backgrounds;
|
|
}
|
|
|
|
static public List<Biography> SeedBiography()
|
|
{
|
|
List<Biography> bios = new List<Biography>
|
|
{
|
|
new Biography
|
|
{
|
|
Id = 1,
|
|
Sex = "Male",
|
|
CharacterId = 1,
|
|
ClassId = 1,
|
|
AlignmentId = 1,
|
|
BackgroundId = 1,
|
|
RaceId = 1,
|
|
Name = "Bob"
|
|
},
|
|
new Biography
|
|
{
|
|
Id = 2,
|
|
Sex = "Female",
|
|
CharacterId = 2,
|
|
ClassId = 2,
|
|
AlignmentId = 2,
|
|
BackgroundId = 2,
|
|
RaceId = 2,
|
|
Name = "Queen Daenerys Stormborn of the House Targaryen, the First of Her Name, Queen of the Andals, the Rhoynar and the First Men, Lady of the Seven Kingdoms and Protector of the Realm, Lady of Dragonstone, Queen of Meereen, Khaleesi of the Great Grass Sea, the Unburnt, Breaker of Chains and Mother of Dragons."
|
|
},
|
|
new Biography
|
|
{
|
|
Id = 3,
|
|
Sex = "Both",
|
|
CharacterId = 3,
|
|
ClassId = 3,
|
|
AlignmentId = 3,
|
|
BackgroundId = 3,
|
|
RaceId = 3,
|
|
Name = "Gandalf the White"
|
|
}
|
|
};
|
|
return bios;
|
|
}
|
|
|
|
static public List<Statistics> SeedStatistics()
|
|
{
|
|
List<Statistics> characters = new List<Statistics>
|
|
{
|
|
new Statistics
|
|
{
|
|
Id = 1,
|
|
CharacterId = 1,
|
|
ArmorClass = 9,
|
|
ExperiencePoints = 2,
|
|
Level = 1,
|
|
Speed = 5,
|
|
Initiative = 12,
|
|
HealthPoints = 20,
|
|
CurrentHealthPoints = 18,
|
|
Proficiency = 1
|
|
},
|
|
new Statistics
|
|
{
|
|
Id = 2,
|
|
CharacterId = 2,
|
|
ArmorClass = 12,
|
|
ExperiencePoints = 0,
|
|
Level = 1,
|
|
Speed = 10,
|
|
Initiative = 7,
|
|
HealthPoints = 26,
|
|
CurrentHealthPoints = 26,
|
|
Proficiency = 1
|
|
},
|
|
new Statistics
|
|
{
|
|
Id = 3,
|
|
CharacterId = 3,
|
|
ArmorClass = 2,
|
|
ExperiencePoints = 24,
|
|
Level = 1,
|
|
Speed = 15,
|
|
Initiative = 18,
|
|
HealthPoints = 7,
|
|
CurrentHealthPoints = 7,
|
|
Proficiency = 2
|
|
}
|
|
};
|
|
return characters;
|
|
}
|
|
}
|
|
}
|