using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ComputerStoreDatabase.Models;

public class Assembly
{
    public int Id { get; set; }

    [Required]
    public string Name { get; set; } = string.Empty;

    public string Description { get; set; } = string.Empty;

    public int UserID { get; set; }

    [ForeignKey("UserID")]
    public virtual User User { get; set; } = new();

    public int? OrderRequestId { get; set; }

    [ForeignKey("OrderRequestId")]
    public virtual Request Request { get; set; } = new();

    [ForeignKey("AssemblyId")]
    public virtual List<ComponentsAssemblies> ComponentsAssemblies { get; set; } = new();
}