Ebook.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. namespace NEducation.Models
  6. {
  7. public class Ebook
  8. {
  9. public String id { get; set; }
  10. public String name { get; set; }
  11. public List<Menu> menus { get; set; } = new List<Menu>();
  12. public Ebook(String id, String name, List<Menu> menus)
  13. {
  14. this.id = id;
  15. this.name = name;
  16. this.menus = menus;
  17. //this.menus.Add(menu);
  18. }
  19. }
  20. public class Video
  21. {
  22. public String id { get; set; }
  23. public String name { get; set; }
  24. public String link { get; set; }
  25. public String image { get; set; }
  26. public Video(String id, String name, String link, String image)
  27. {
  28. this.id = id;
  29. this.name = name;
  30. this.link = link;
  31. this.image = image;
  32. }
  33. }
  34. public class Menu
  35. {
  36. public String name { get; set; }
  37. public List<Book> books { get; set; } = new List<Book>();
  38. public Menu(String name, List<Book> books)
  39. {
  40. this.name = name;
  41. this.books = books;
  42. //this.books.Add(book);
  43. }
  44. }
  45. public class Book
  46. {
  47. public String name { get; set; }
  48. public List<Description> descriptions { get; set; } = new List<Description>();
  49. public Book(String name, List<Description> descriptions)
  50. {
  51. this.name = name;
  52. this.descriptions = descriptions;
  53. //this.descriptions.Add(description);
  54. }
  55. }
  56. public class Description
  57. {
  58. public String name { get; set; }
  59. public List<Download> downloads { get; set; } = new List<Download>();
  60. public Description(String name, List<Download> downloads)
  61. {
  62. this.name = name;
  63. this.downloads = downloads;
  64. //this.downloads.Add(download);
  65. }
  66. }
  67. public class Download
  68. {
  69. public String name { get; set; }
  70. public String link { get; set; }
  71. public Download(String name, String link)
  72. {
  73. this.name = name;
  74. this.link = link;
  75. }
  76. }
  77. }