using Supabase.Postgrest.Attributes;
using Supabase.Postgrest.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ColumnAttribute = Supabase.Postgrest.Attributes.ColumnAttribute;

namespace TestProject1
{
    public class Label : BaseModel
    {
        [PrimaryKey("id")] public int ID { get; set; }
        [Column("label_name")] public string label { get; set; }
    }

    public class Age_rating : BaseModel
    {
        [PrimaryKey("id")] public int ID { get; set; }
        [Column("rating")] public string rating { get; set; }
    }

    public class Company : BaseModel
    {
        [PrimaryKey("id")] public int Id { get; set; }
        [Column("name_company")] public string name { get; set; }
        [Column("picture")] public string picture { get; set; }
        [Column("description")] public string desc { get; set; }
    }
    public class Game : BaseModel
    {
        [Key]
        [Column("id")] 
        public int Id { get; set; }

        [Column("name_game")] 
        public string Name { get; set; }

        [Column("description")] 
        public string? Desc { get; set; }

        [ForeignKey("Company")]
        [Column("company")] 
        public int Company{ get; set; }

        [Column("picture")] 
        public string? Picture { get; set; }

        [Column("views")] 
        public int? Views { get; set; }

        [Column("favourites")] 
        public int? Fav { get; set; }

        [ForeignKey("Age_rating")] 
        [Column("age_rating")] 
        public int Age { get; set; }

        [Column("link_oficial")] 
        public string? Ofi { get; set; }

        [Column("link_torrent")] 
        public string? Tor { get; set; }
    }
}
