Models.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using Supabase.Postgrest.Attributes;
  2. using Supabase.Postgrest.Models;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.ComponentModel.DataAnnotations.Schema;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using ColumnAttribute = Supabase.Postgrest.Attributes.ColumnAttribute;
  11. namespace TestProject1
  12. {
  13. public class Label : BaseModel
  14. {
  15. [PrimaryKey("id")] public int ID { get; set; }
  16. [Column("label_name")] public string label { get; set; }
  17. }
  18. public class Age_rating : BaseModel
  19. {
  20. [PrimaryKey("id")] public int ID { get; set; }
  21. [Column("rating")] public string rating { get; set; }
  22. }
  23. public class Company : BaseModel
  24. {
  25. [PrimaryKey("id")] public int Id { get; set; }
  26. [Column("name_company")] public string name { get; set; }
  27. [Column("picture")] public string picture { get; set; }
  28. [Column("description")] public string desc { get; set; }
  29. }
  30. public class Game : BaseModel
  31. {
  32. [Key]
  33. [Column("id")]
  34. public int Id { get; set; }
  35. [Column("name_game")]
  36. public string Name { get; set; }
  37. [Column("description")]
  38. public string? Desc { get; set; }
  39. [ForeignKey("Company")]
  40. [Column("company")]
  41. public int Company{ get; set; }
  42. [Column("picture")]
  43. public string? Picture { get; set; }
  44. [Column("views")]
  45. public int? Views { get; set; }
  46. [Column("favourites")]
  47. public int? Fav { get; set; }
  48. [ForeignKey("Age_rating")]
  49. [Column("age_rating")]
  50. public int Age { get; set; }
  51. [Column("link_oficial")]
  52. public string? Ofi { get; set; }
  53. [Column("link_torrent")]
  54. public string? Tor { get; set; }
  55. }
  56. }