mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -04:00
29 lines
697 B
C#
29 lines
697 B
C#
using Newtonsoft.Json;
|
|
|
|
namespace Kyoo.Models
|
|
{
|
|
public class Library
|
|
{
|
|
[JsonIgnore] public readonly long id;
|
|
public string Slug;
|
|
public string Name;
|
|
public string Path;
|
|
|
|
public Library(long id, string slug, string name, string path)
|
|
{
|
|
this.id = id;
|
|
Slug = slug;
|
|
Name = name;
|
|
Path = path;
|
|
}
|
|
|
|
public static Library FromReader(System.Data.SQLite.SQLiteDataReader reader)
|
|
{
|
|
return new Library((long)reader["id"],
|
|
reader["slug"] as string,
|
|
reader["name"] as string,
|
|
reader["path"] as string);
|
|
}
|
|
}
|
|
}
|