mirror of
https://github.com/claunia/marechai.git
synced 2026-07-08 17:57:08 +00:00
- Created migration to add `software_platforms_by_machine` table with necessary fields and constraints. - Updated `MarechaiContext` to include `SoftwarePlatformsByMachine` DbSet and configured entity relationships. - Implemented `SoftwarePlatformsByMachine` model to represent the junction between software platforms and machines. - Developed `SoftwarePlatformsByMachineController` for CRUD operations, including endpoints to get, add, and delete software platforms associated with a machine. - Enhanced `Machine` model to include a collection of `SoftwarePlatformsByMachine`. - Updated UI components in `MachineDialog.razor` to manage software platforms, including search and removal functionalities. - Added localization support for software platform management strings in multiple languages. - Implemented service methods in `MachinesService` for managing software platforms associated with machines.
13 lines
562 B
C#
13 lines
562 B
C#
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Marechai.Database.Models;
|
|
|
|
public class SoftwarePlatform : BaseModel<ulong>
|
|
{
|
|
[Required]
|
|
public string Name { get; set; } // Xbox, PlayStation, PC, etc.
|
|
public virtual ICollection<SoftwareRelease> SoftwareReleases { get; set; }
|
|
public virtual ICollection<SoftwareScreenshot> Screenshots { get; set; }
|
|
public virtual ICollection<SoftwarePlatformsByMachine> Machines { get; set; }
|
|
} |