mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Update DB to version 17: Machines can have an arbitrary number of sound synthetizers,
so use an interconnection table, `sound_by_machine`.
This commit is contained in:
@@ -43,20 +43,17 @@ namespace cicm_web.Models
|
||||
public Company Company;
|
||||
public DiskFormat Disk1;
|
||||
public DiskFormat Disk2;
|
||||
public GpuByMachine[] Gpus;
|
||||
public GpuByMachine[] Gpus;
|
||||
public DiskFormat Hdd1;
|
||||
public DiskFormat Hdd2;
|
||||
public DiskFormat Hdd3;
|
||||
public int Id;
|
||||
public string Model;
|
||||
public int MusicChannels;
|
||||
public SoundSynth MusicSynth;
|
||||
public ProcessorByMachine[] Processors;
|
||||
public int Ram;
|
||||
public string Resolution;
|
||||
public int Rom;
|
||||
public int SoundChannels;
|
||||
public SoundSynth SoundSynth;
|
||||
public SoundByMachine[] SoundSynths;
|
||||
public MachineType Type;
|
||||
public int Vram;
|
||||
public int Year;
|
||||
@@ -92,21 +89,22 @@ namespace cicm_web.Models
|
||||
{
|
||||
Machine item = new Machine
|
||||
{
|
||||
Colors = dbItem.Colors,
|
||||
Company = Company.GetItem(dbItem.Company),
|
||||
Colors = dbItem.Colors,
|
||||
Company = Company.GetItem(dbItem.Company),
|
||||
Gpus = GpuByMachine.GetAllItems(dbItem.Id),
|
||||
Hdd1 = DiskFormat.GetItem(dbItem.Hdd1),
|
||||
Hdd2 = DiskFormat.GetItem(dbItem.Hdd2),
|
||||
Hdd3 = DiskFormat.GetItem(dbItem.Hdd3),
|
||||
Id = dbItem.Id,
|
||||
Model = dbItem.Model,
|
||||
Ram = dbItem.Ram,
|
||||
Resolution = dbItem.Resolution,
|
||||
Rom = dbItem.Rom,
|
||||
Vram = dbItem.Vram,
|
||||
Year = dbItem.Year,
|
||||
Type = dbItem.Type,
|
||||
Processors = ProcessorByMachine.GetAllItems(dbItem.Id)
|
||||
Hdd1 = DiskFormat.GetItem(dbItem.Hdd1),
|
||||
Hdd2 = DiskFormat.GetItem(dbItem.Hdd2),
|
||||
Hdd3 = DiskFormat.GetItem(dbItem.Hdd3),
|
||||
Id = dbItem.Id,
|
||||
Model = dbItem.Model,
|
||||
Ram = dbItem.Ram,
|
||||
Resolution = dbItem.Resolution,
|
||||
Rom = dbItem.Rom,
|
||||
Vram = dbItem.Vram,
|
||||
Year = dbItem.Year,
|
||||
Type = dbItem.Type,
|
||||
Processors = ProcessorByMachine.GetAllItems(dbItem.Id),
|
||||
SoundSynths = SoundByMachine.GetAllItems(dbItem.Id)
|
||||
};
|
||||
|
||||
if(dbItem.Disk1 > 0)
|
||||
@@ -121,18 +119,6 @@ namespace cicm_web.Models
|
||||
item.Disk2 = DiskFormat.GetItem(dbItem.Disk2);
|
||||
}
|
||||
|
||||
if(dbItem.MusicSynth > 0)
|
||||
{
|
||||
item.MusicSynth = SoundSynth.GetItem(dbItem.MusicSynth);
|
||||
item.MusicChannels = dbItem.MusicChannels;
|
||||
}
|
||||
|
||||
if(dbItem.SoundSynth > 0)
|
||||
{
|
||||
item.SoundSynth = SoundSynth.GetItem(dbItem.SoundSynth);
|
||||
item.SoundChannels = dbItem.SoundChannels;
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user