30 lines
835 B
C#

using SQLite;
using System;
namespace Billing.Models
{
public class Category : IIdItem
{
private const string ICON_DEFAULT = "ic_default";
private const long TRANSPARENT_COLOR = 0x00ffffffL;
private static Category empty;
public static Category Empty => empty ??= new() { Id = -1 };
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
public CategoryType Type { get; set; }
public string Icon { get; set; } = ICON_DEFAULT;
public string Name { get; set; }
public long TintColor { get; set; } = TRANSPARENT_COLOR;
public int? ParentId { get; set; }
public DateTime? LastUsed { get; set; }
public int? LastAccountId { get; set; }
}
public enum CategoryType
{
Spending,
Income
}
}