aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.DataStore.LiteDB/LiteDBDataStoreItem.cs
blob: 544a15b6107b325aa4273e0a357f909041922f13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using LiteDB;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tango.DataStore.Lite
{
    public class LiteDBDataStoreItem : IDataStoreItem
    {
        public String Guid { get; set; }
        [BsonId]
        public string Key { get; set; }
        public DataType Type { get; set; }
        public object Value { get; set; }
        public DateTime Date { get; set; }
        public bool IsSynchronized { get; set; }

        public LiteDBDataStoreItem()
        {
            Guid = System.Guid.NewGuid().ToString();
        }

        public override string ToString()
        {
            return $"{Key}: {Value}";
        }
    }
}