|
1 | 1 | |
| 2 | +using Newtonsoft.Json; |
2 | 3 | using SQLite; |
3 | 4 | using System.Collections.ObjectModel; |
4 | 5 | using Color = Microsoft.Maui.Graphics.Color; |
5 | 6 |
|
6 | 7 | namespace GamHubApp.Models; |
7 | 8 |
|
8 | | - public class Feed : SelectableModel |
9 | | - { |
10 | | - [PrimaryKey, Column("_id")] |
11 | | - public string Id { get; set; } |
12 | | - public string Title { get; set; } |
| 9 | +public class Feed : SelectableModel |
| 10 | +{ |
| 11 | + [PrimaryKey, Column("_id")] |
| 12 | + public string Id { get; set; } |
| 13 | + [JsonProperty("_id"), Column("mongoID")] |
| 14 | + public string MongoID { get; set; } |
| 15 | + public string Title { get; set; } |
13 | 16 |
|
14 | | - private string _keywords; |
15 | | - public string Keywords |
| 17 | + private string _keywords; |
| 18 | + [JsonProperty("keyword")] |
| 19 | + public string Keywords |
| 20 | + { |
| 21 | + get { return _keywords; } |
| 22 | + set |
16 | 23 | { |
17 | | - get { return _keywords; } |
18 | | - set |
19 | | - { |
20 | | - _keywords = value; |
21 | | - OnPropertyChanged(nameof(Keywords)); |
22 | | - } |
| 24 | + _keywords = value; |
| 25 | + OnPropertyChanged(nameof(Keywords)); |
23 | 26 | } |
24 | | - public bool IsSaved { get; set; } |
25 | | - [Ignore] |
26 | | - public bool IsLoaded { get; set; } |
27 | | - [Ignore] |
28 | | - public Color ButtonColor { get; set; } = (Color)Application.Current.Resources["LightDark"]; |
29 | | - [Ignore] |
30 | | - public ObservableCollection<Article> Articles { get; set; } |
31 | | - |
32 | 27 | } |
| 28 | + public bool IsSaved { get; set; } |
| 29 | + [Ignore] |
| 30 | + public bool IsLoaded { get; set; } |
| 31 | + [Ignore] |
| 32 | + public Color ButtonColor { get; set; } = (Color)Application.Current.Resources["LightDark"]; |
| 33 | + [Ignore] |
| 34 | + public ObservableCollection<Article> Articles { get; set; } |
| 35 | + |
| 36 | +} |
0 commit comments