commit
3a61c9a878
@ -1,70 +0,0 @@
|
||||
using System;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Model.Activity;
|
||||
using MediaBrowser.Model.Events;
|
||||
using MediaBrowser.Model.Querying;
|
||||
|
||||
namespace Emby.Server.Implementations.Activity
|
||||
{
|
||||
/// <summary>
|
||||
/// The activity log manager.
|
||||
/// </summary>
|
||||
public class ActivityManager : IActivityManager
|
||||
{
|
||||
private readonly IActivityRepository _repo;
|
||||
private readonly IUserManager _userManager;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ActivityManager"/> class.
|
||||
/// </summary>
|
||||
/// <param name="repo">The activity repository.</param>
|
||||
/// <param name="userManager">The user manager.</param>
|
||||
public ActivityManager(IActivityRepository repo, IUserManager userManager)
|
||||
{
|
||||
_repo = repo;
|
||||
_userManager = userManager;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public event EventHandler<GenericEventArgs<ActivityLogEntry>> EntryCreated;
|
||||
|
||||
public void Create(ActivityLogEntry entry)
|
||||
{
|
||||
entry.Date = DateTime.UtcNow;
|
||||
|
||||
_repo.Create(entry);
|
||||
|
||||
EntryCreated?.Invoke(this, new GenericEventArgs<ActivityLogEntry>(entry));
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public QueryResult<ActivityLogEntry> GetActivityLogEntries(DateTime? minDate, bool? hasUserId, int? startIndex, int? limit)
|
||||
{
|
||||
var result = _repo.GetActivityLogEntries(minDate, hasUserId, startIndex, limit);
|
||||
|
||||
foreach (var item in result.Items)
|
||||
{
|
||||
if (item.UserId == Guid.Empty)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var user = _userManager.GetUserById(item.UserId);
|
||||
|
||||
if (user != null)
|
||||
{
|
||||
var dto = _userManager.GetUserDto(user);
|
||||
item.UserPrimaryImageTag = dto.PrimaryImageTag;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public QueryResult<ActivityLogEntry> GetActivityLogEntries(DateTime? minDate, int? startIndex, int? limit)
|
||||
{
|
||||
return GetActivityLogEntries(minDate, null, startIndex, limit);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,308 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Emby.Server.Implementations.Data;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Model.Activity;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SQLitePCL.pretty;
|
||||
|
||||
namespace Emby.Server.Implementations.Activity
|
||||
{
|
||||
/// <summary>
|
||||
/// The activity log repository.
|
||||
/// </summary>
|
||||
public class ActivityRepository : BaseSqliteRepository, IActivityRepository
|
||||
{
|
||||
private const string BaseActivitySelectText = "select Id, Name, Overview, ShortOverview, Type, ItemId, UserId, DateCreated, LogSeverity from ActivityLog";
|
||||
|
||||
private readonly IFileSystem _fileSystem;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ActivityRepository"/> class.
|
||||
/// </summary>
|
||||
/// <param name="logger">The logger.</param>
|
||||
/// <param name="appPaths">The server application paths.</param>
|
||||
/// <param name="fileSystem">The filesystem.</param>
|
||||
public ActivityRepository(ILogger<ActivityRepository> logger, IServerApplicationPaths appPaths, IFileSystem fileSystem)
|
||||
: base(logger)
|
||||
{
|
||||
DbFilePath = Path.Combine(appPaths.DataPath, "activitylog.db");
|
||||
_fileSystem = fileSystem;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes the <see cref="ActivityRepository"/>.
|
||||
/// </summary>
|
||||
public void Initialize()
|
||||
{
|
||||
try
|
||||
{
|
||||
InitializeInternal();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError(ex, "Error loading database file. Will reset and retry.");
|
||||
|
||||
_fileSystem.DeleteFile(DbFilePath);
|
||||
|
||||
InitializeInternal();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeInternal()
|
||||
{
|
||||
using var connection = GetConnection();
|
||||
connection.RunQueries(new[]
|
||||
{
|
||||
"create table if not exists ActivityLog (Id INTEGER PRIMARY KEY, Name TEXT NOT NULL, Overview TEXT, ShortOverview TEXT, Type TEXT NOT NULL, ItemId TEXT, UserId TEXT, DateCreated DATETIME NOT NULL, LogSeverity TEXT NOT NULL)",
|
||||
"drop index if exists idx_ActivityLogEntries"
|
||||
});
|
||||
|
||||
TryMigrate(connection);
|
||||
}
|
||||
|
||||
private void TryMigrate(ManagedConnection connection)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (TableExists(connection, "ActivityLogEntries"))
|
||||
{
|
||||
connection.RunQueries(new[]
|
||||
{
|
||||
"INSERT INTO ActivityLog (Name, Overview, ShortOverview, Type, ItemId, UserId, DateCreated, LogSeverity) SELECT Name, Overview, ShortOverview, Type, ItemId, UserId, DateCreated, LogSeverity FROM ActivityLogEntries",
|
||||
"drop table if exists ActivityLogEntries"
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError(ex, "Error migrating activity log database");
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Create(ActivityLogEntry entry)
|
||||
{
|
||||
if (entry == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(entry));
|
||||
}
|
||||
|
||||
using var connection = GetConnection();
|
||||
connection.RunInTransaction(db =>
|
||||
{
|
||||
using var statement = db.PrepareStatement("insert into ActivityLog (Name, Overview, ShortOverview, Type, ItemId, UserId, DateCreated, LogSeverity) values (@Name, @Overview, @ShortOverview, @Type, @ItemId, @UserId, @DateCreated, @LogSeverity)");
|
||||
statement.TryBind("@Name", entry.Name);
|
||||
|
||||
statement.TryBind("@Overview", entry.Overview);
|
||||
statement.TryBind("@ShortOverview", entry.ShortOverview);
|
||||
statement.TryBind("@Type", entry.Type);
|
||||
statement.TryBind("@ItemId", entry.ItemId);
|
||||
|
||||
if (entry.UserId.Equals(Guid.Empty))
|
||||
{
|
||||
statement.TryBindNull("@UserId");
|
||||
}
|
||||
else
|
||||
{
|
||||
statement.TryBind("@UserId", entry.UserId.ToString("N", CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
statement.TryBind("@DateCreated", entry.Date.ToDateTimeParamValue());
|
||||
statement.TryBind("@LogSeverity", entry.Severity.ToString());
|
||||
|
||||
statement.MoveNext();
|
||||
}, TransactionMode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the provided <see cref="ActivityLogEntry"/> to this repository.
|
||||
/// </summary>
|
||||
/// <param name="entry">The activity log entry.</param>
|
||||
/// <exception cref="ArgumentNullException">If entry is null.</exception>
|
||||
public void Update(ActivityLogEntry entry)
|
||||
{
|
||||
if (entry == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(entry));
|
||||
}
|
||||
|
||||
using var connection = GetConnection();
|
||||
connection.RunInTransaction(db =>
|
||||
{
|
||||
using var statement = db.PrepareStatement("Update ActivityLog set Name=@Name,Overview=@Overview,ShortOverview=@ShortOverview,Type=@Type,ItemId=@ItemId,UserId=@UserId,DateCreated=@DateCreated,LogSeverity=@LogSeverity where Id=@Id");
|
||||
statement.TryBind("@Id", entry.Id);
|
||||
|
||||
statement.TryBind("@Name", entry.Name);
|
||||
statement.TryBind("@Overview", entry.Overview);
|
||||
statement.TryBind("@ShortOverview", entry.ShortOverview);
|
||||
statement.TryBind("@Type", entry.Type);
|
||||
statement.TryBind("@ItemId", entry.ItemId);
|
||||
|
||||
if (entry.UserId.Equals(Guid.Empty))
|
||||
{
|
||||
statement.TryBindNull("@UserId");
|
||||
}
|
||||
else
|
||||
{
|
||||
statement.TryBind("@UserId", entry.UserId.ToString("N", CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
statement.TryBind("@DateCreated", entry.Date.ToDateTimeParamValue());
|
||||
statement.TryBind("@LogSeverity", entry.Severity.ToString());
|
||||
|
||||
statement.MoveNext();
|
||||
}, TransactionMode);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public QueryResult<ActivityLogEntry> GetActivityLogEntries(DateTime? minDate, bool? hasUserId, int? startIndex, int? limit)
|
||||
{
|
||||
var commandText = BaseActivitySelectText;
|
||||
var whereClauses = new List<string>();
|
||||
|
||||
if (minDate.HasValue)
|
||||
{
|
||||
whereClauses.Add("DateCreated>=@DateCreated");
|
||||
}
|
||||
|
||||
if (hasUserId.HasValue)
|
||||
{
|
||||
whereClauses.Add(hasUserId.Value ? "UserId not null" : "UserId is null");
|
||||
}
|
||||
|
||||
var whereTextWithoutPaging = whereClauses.Count == 0 ?
|
||||
string.Empty :
|
||||
" where " + string.Join(" AND ", whereClauses.ToArray());
|
||||
|
||||
if (startIndex.HasValue && startIndex.Value > 0)
|
||||
{
|
||||
var pagingWhereText = whereClauses.Count == 0 ?
|
||||
string.Empty :
|
||||
" where " + string.Join(" AND ", whereClauses.ToArray());
|
||||
|
||||
whereClauses.Add(
|
||||
string.Format(
|
||||
CultureInfo.InvariantCulture,
|
||||
"Id NOT IN (SELECT Id FROM ActivityLog {0} ORDER BY DateCreated DESC LIMIT {1})",
|
||||
pagingWhereText,
|
||||
startIndex.Value));
|
||||
}
|
||||
|
||||
var whereText = whereClauses.Count == 0 ?
|
||||
string.Empty :
|
||||
" where " + string.Join(" AND ", whereClauses.ToArray());
|
||||
|
||||
commandText += whereText;
|
||||
|
||||
commandText += " ORDER BY DateCreated DESC";
|
||||
|
||||
if (limit.HasValue)
|
||||
{
|
||||
commandText += " LIMIT " + limit.Value.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
var statementTexts = new[]
|
||||
{
|
||||
commandText,
|
||||
"select count (Id) from ActivityLog" + whereTextWithoutPaging
|
||||
};
|
||||
|
||||
var list = new List<ActivityLogEntry>();
|
||||
var result = new QueryResult<ActivityLogEntry>();
|
||||
|
||||
using var connection = GetConnection(true);
|
||||
connection.RunInTransaction(
|
||||
db =>
|
||||
{
|
||||
var statements = PrepareAll(db, statementTexts).ToList();
|
||||
|
||||
using (var statement = statements[0])
|
||||
{
|
||||
if (minDate.HasValue)
|
||||
{
|
||||
statement.TryBind("@DateCreated", minDate.Value.ToDateTimeParamValue());
|
||||
}
|
||||
|
||||
list.AddRange(statement.ExecuteQuery().Select(GetEntry));
|
||||
}
|
||||
|
||||
using (var statement = statements[1])
|
||||
{
|
||||
if (minDate.HasValue)
|
||||
{
|
||||
statement.TryBind("@DateCreated", minDate.Value.ToDateTimeParamValue());
|
||||
}
|
||||
|
||||
result.TotalRecordCount = statement.ExecuteQuery().SelectScalarInt().First();
|
||||
}
|
||||
},
|
||||
ReadTransactionMode);
|
||||
|
||||
result.Items = list;
|
||||
return result;
|
||||
}
|
||||
|
||||
private static ActivityLogEntry GetEntry(IReadOnlyList<IResultSetValue> reader)
|
||||
{
|
||||
var index = 0;
|
||||
|
||||
var info = new ActivityLogEntry
|
||||
{
|
||||
Id = reader[index].ToInt64()
|
||||
};
|
||||
|
||||
index++;
|
||||
if (reader[index].SQLiteType != SQLiteType.Null)
|
||||
{
|
||||
info.Name = reader[index].ToString();
|
||||
}
|
||||
|
||||
index++;
|
||||
if (reader[index].SQLiteType != SQLiteType.Null)
|
||||
{
|
||||
info.Overview = reader[index].ToString();
|
||||
}
|
||||
|
||||
index++;
|
||||
if (reader[index].SQLiteType != SQLiteType.Null)
|
||||
{
|
||||
info.ShortOverview = reader[index].ToString();
|
||||
}
|
||||
|
||||
index++;
|
||||
if (reader[index].SQLiteType != SQLiteType.Null)
|
||||
{
|
||||
info.Type = reader[index].ToString();
|
||||
}
|
||||
|
||||
index++;
|
||||
if (reader[index].SQLiteType != SQLiteType.Null)
|
||||
{
|
||||
info.ItemId = reader[index].ToString();
|
||||
}
|
||||
|
||||
index++;
|
||||
if (reader[index].SQLiteType != SQLiteType.Null)
|
||||
{
|
||||
info.UserId = new Guid(reader[index].ToString());
|
||||
}
|
||||
|
||||
index++;
|
||||
info.Date = reader[index].ReadDateTime();
|
||||
|
||||
index++;
|
||||
if (reader[index].SQLiteType != SQLiteType.Null)
|
||||
{
|
||||
info.Severity = Enum.Parse<LogLevel>(reader[index].ToString(), true);
|
||||
}
|
||||
|
||||
return info;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Emby.Server.Implementations.Net;
|
||||
using MediaBrowser.Model.Services;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Emby.Server.Implementations.HttpServer
|
||||
{
|
||||
public interface IHttpListener : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the error handler.
|
||||
/// </summary>
|
||||
/// <value>The error handler.</value>
|
||||
Func<Exception, IRequest, bool, bool, Task> ErrorHandler { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the request handler.
|
||||
/// </summary>
|
||||
/// <value>The request handler.</value>
|
||||
Func<IHttpRequest, string, string, string, CancellationToken, Task> RequestHandler { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the web socket handler.
|
||||
/// </summary>
|
||||
/// <value>The web socket handler.</value>
|
||||
Action<WebSocketConnectEventArgs> WebSocketConnected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Stops this instance.
|
||||
/// </summary>
|
||||
Task Stop();
|
||||
|
||||
Task ProcessWebSocketRequest(HttpContext ctx);
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
{
|
||||
"MusicVideos": "Музичні відео",
|
||||
"Music": "Музика",
|
||||
"Movies": "Фільми",
|
||||
"MessageApplicationUpdatedTo": "Jellyfin Server був оновлений до версії {0}",
|
||||
"MessageApplicationUpdated": "Jellyfin Server був оновлений",
|
||||
"Latest": "Останні",
|
||||
"LabelIpAddressValue": "IP-адреси: {0}",
|
||||
"ItemRemovedWithName": "{0} видалено з бібліотеки",
|
||||
"ItemAddedWithName": "{0} додано до бібліотеки",
|
||||
"HeaderNextUp": "Наступний",
|
||||
"HeaderLiveTV": "Ефірне ТБ",
|
||||
"HeaderFavoriteSongs": "Улюблені пісні",
|
||||
"HeaderFavoriteShows": "Улюблені шоу",
|
||||
"HeaderFavoriteEpisodes": "Улюблені серії",
|
||||
"HeaderFavoriteArtists": "Улюблені виконавці",
|
||||
"HeaderFavoriteAlbums": "Улюблені альбоми",
|
||||
"HeaderContinueWatching": "Продовжити перегляд",
|
||||
"HeaderCameraUploads": "Завантажено з камери",
|
||||
"HeaderAlbumArtists": "Виконавці альбомів",
|
||||
"Genres": "Жанри",
|
||||
"Folders": "Директорії",
|
||||
"Favorites": "Улюблені",
|
||||
"DeviceOnlineWithName": "{0} під'єднано",
|
||||
"DeviceOfflineWithName": "{0} від'єднано",
|
||||
"Collections": "Колекції",
|
||||
"ChapterNameValue": "Глава {0}",
|
||||
"Channels": "Канали",
|
||||
"CameraImageUploadedFrom": "Нова фотографія завантажена з {0}",
|
||||
"Books": "Книги",
|
||||
"AuthenticationSucceededWithUserName": "{0} успішно авторизовані",
|
||||
"Artists": "Виконавці",
|
||||
"Application": "Додаток",
|
||||
"AppDeviceValues": "Додаток: {0}, Пристрій: {1}",
|
||||
"Albums": "Альбоми"
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using WebSocketManager = Emby.Server.Implementations.WebSockets.WebSocketManager;
|
||||
|
||||
namespace Emby.Server.Implementations.Middleware
|
||||
{
|
||||
public class WebSocketMiddleware
|
||||
{
|
||||
private readonly RequestDelegate _next;
|
||||
private readonly ILogger<WebSocketMiddleware> _logger;
|
||||
private readonly WebSocketManager _webSocketManager;
|
||||
|
||||
public WebSocketMiddleware(RequestDelegate next, ILogger<WebSocketMiddleware> logger, WebSocketManager webSocketManager)
|
||||
{
|
||||
_next = next;
|
||||
_logger = logger;
|
||||
_webSocketManager = webSocketManager;
|
||||
}
|
||||
|
||||
public async Task Invoke(HttpContext httpContext)
|
||||
{
|
||||
_logger.LogInformation("Handling request: " + httpContext.Request.Path);
|
||||
|
||||
if (httpContext.WebSockets.IsWebSocketRequest)
|
||||
{
|
||||
var webSocketContext = await httpContext.WebSockets.AcceptWebSocketAsync(null).ConfigureAwait(false);
|
||||
if (webSocketContext != null)
|
||||
{
|
||||
await _webSocketManager.OnWebSocketConnected(webSocketContext).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await _next.Invoke(httpContext).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
using System;
|
||||
using System.Net.WebSockets;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Emby.Server.Implementations.Net
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IWebSocket
|
||||
/// </summary>
|
||||
public interface IWebSocket : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Occurs when [closed].
|
||||
/// </summary>
|
||||
event EventHandler<EventArgs> Closed;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the state.
|
||||
/// </summary>
|
||||
/// <value>The state.</value>
|
||||
WebSocketState State { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the receive action.
|
||||
/// </summary>
|
||||
/// <value>The receive action.</value>
|
||||
Action<byte[]> OnReceiveBytes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sends the async.
|
||||
/// </summary>
|
||||
/// <param name="bytes">The bytes.</param>
|
||||
/// <param name="endOfMessage">if set to <c>true</c> [end of message].</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task SendAsync(byte[] bytes, bool endOfMessage, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Sends the asynchronous.
|
||||
/// </summary>
|
||||
/// <param name="text">The text.</param>
|
||||
/// <param name="endOfMessage">if set to <c>true</c> [end of message].</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task SendAsync(string text, bool endOfMessage, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Emby.Server.Implementations.Net
|
||||
{
|
||||
public class WebSocketConnectEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the URL.
|
||||
/// </summary>
|
||||
/// <value>The URL.</value>
|
||||
public string Url { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the query string.
|
||||
/// </summary>
|
||||
/// <value>The query string.</value>
|
||||
public IQueryCollection QueryString { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the web socket.
|
||||
/// </summary>
|
||||
/// <value>The web socket.</value>
|
||||
public IWebSocket WebSocket { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the endpoint.
|
||||
/// </summary>
|
||||
/// <value>The endpoint.</value>
|
||||
public string Endpoint { get; set; }
|
||||
}
|
||||
}
|
@ -1,191 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Net;
|
||||
using MediaBrowser.Controller.Session;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using MediaBrowser.Model.Session;
|
||||
|
||||
namespace Emby.Server.Implementations.Session
|
||||
{
|
||||
public class HttpSessionController : ISessionController
|
||||
{
|
||||
private readonly IHttpClient _httpClient;
|
||||
private readonly IJsonSerializer _json;
|
||||
private readonly ISessionManager _sessionManager;
|
||||
|
||||
public SessionInfo Session { get; private set; }
|
||||
|
||||
private readonly string _postUrl;
|
||||
|
||||
public HttpSessionController(IHttpClient httpClient,
|
||||
IJsonSerializer json,
|
||||
SessionInfo session,
|
||||
string postUrl, ISessionManager sessionManager)
|
||||
{
|
||||
_httpClient = httpClient;
|
||||
_json = json;
|
||||
Session = session;
|
||||
_postUrl = postUrl;
|
||||
_sessionManager = sessionManager;
|
||||
}
|
||||
|
||||
private string PostUrl => string.Format("http://{0}{1}", Session.RemoteEndPoint, _postUrl);
|
||||
|
||||
public bool IsSessionActive => (DateTime.UtcNow - Session.LastActivityDate).TotalMinutes <= 5;
|
||||
|
||||
public bool SupportsMediaControl => true;
|
||||
|
||||
private Task SendMessage(string name, string messageId, CancellationToken cancellationToken)
|
||||
{
|
||||
return SendMessage(name, messageId, new Dictionary<string, string>(), cancellationToken);
|
||||
}
|
||||
|
||||
private Task SendMessage(string name, string messageId, Dictionary<string, string> args, CancellationToken cancellationToken)
|
||||
{
|
||||
args["messageId"] = messageId;
|
||||
var url = PostUrl + "/" + name + ToQueryString(args);
|
||||
|
||||
return SendRequest(new HttpRequestOptions
|
||||
{
|
||||
Url = url,
|
||||
CancellationToken = cancellationToken,
|
||||
BufferContent = false
|
||||
});
|
||||
}
|
||||
|
||||
private Task SendPlayCommand(PlayRequest command, string messageId, CancellationToken cancellationToken)
|
||||
{
|
||||
var dict = new Dictionary<string, string>();
|
||||
|
||||
dict["ItemIds"] = string.Join(",", command.ItemIds.Select(i => i.ToString("N", CultureInfo.InvariantCulture)).ToArray());
|
||||
|
||||
if (command.StartPositionTicks.HasValue)
|
||||
{
|
||||
dict["StartPositionTicks"] = command.StartPositionTicks.Value.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
if (command.AudioStreamIndex.HasValue)
|
||||
{
|
||||
dict["AudioStreamIndex"] = command.AudioStreamIndex.Value.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
if (command.SubtitleStreamIndex.HasValue)
|
||||
{
|
||||
dict["SubtitleStreamIndex"] = command.SubtitleStreamIndex.Value.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
if (command.StartIndex.HasValue)
|
||||
{
|
||||
dict["StartIndex"] = command.StartIndex.Value.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(command.MediaSourceId))
|
||||
{
|
||||
dict["MediaSourceId"] = command.MediaSourceId;
|
||||
}
|
||||
|
||||
return SendMessage(command.PlayCommand.ToString(), messageId, dict, cancellationToken);
|
||||
}
|
||||
|
||||
private Task SendPlaystateCommand(PlaystateRequest command, string messageId, CancellationToken cancellationToken)
|
||||
{
|
||||
var args = new Dictionary<string, string>();
|
||||
|
||||
if (command.Command == PlaystateCommand.Seek)
|
||||
{
|
||||
if (!command.SeekPositionTicks.HasValue)
|
||||
{
|
||||
throw new ArgumentException("SeekPositionTicks cannot be null");
|
||||
}
|
||||
|
||||
args["SeekPositionTicks"] = command.SeekPositionTicks.Value.ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
return SendMessage(command.Command.ToString(), messageId, args, cancellationToken);
|
||||
}
|
||||
|
||||
private string[] _supportedMessages = Array.Empty<string>();
|
||||
public Task SendMessage<T>(string name, string messageId, T data, ISessionController[] allControllers, CancellationToken cancellationToken)
|
||||
{
|
||||
if (!IsSessionActive)
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
if (string.Equals(name, "Play", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return SendPlayCommand(data as PlayRequest, messageId, cancellationToken);
|
||||
}
|
||||
if (string.Equals(name, "PlayState", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return SendPlaystateCommand(data as PlaystateRequest, messageId, cancellationToken);
|
||||
}
|
||||
if (string.Equals(name, "GeneralCommand", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var command = data as GeneralCommand;
|
||||
return SendMessage(command.Name, messageId, command.Arguments, cancellationToken);
|
||||
}
|
||||
|
||||
if (!_supportedMessages.Contains(name, StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
var url = PostUrl + "/" + name;
|
||||
|
||||
url += "?messageId=" + messageId;
|
||||
|
||||
var options = new HttpRequestOptions
|
||||
{
|
||||
Url = url,
|
||||
CancellationToken = cancellationToken,
|
||||
BufferContent = false
|
||||
};
|
||||
|
||||
if (data != null)
|
||||
{
|
||||
if (typeof(T) == typeof(string))
|
||||
{
|
||||
var str = data as string;
|
||||
if (!string.IsNullOrEmpty(str))
|
||||
{
|
||||
options.RequestContent = str;
|
||||
options.RequestContentType = "application/json";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
options.RequestContent = _json.SerializeToString(data);
|
||||
options.RequestContentType = "application/json";
|
||||
}
|
||||
}
|
||||
|
||||
return SendRequest(options);
|
||||
}
|
||||
|
||||
private async Task SendRequest(HttpRequestOptions options)
|
||||
{
|
||||
using (var response = await _httpClient.Post(options).ConfigureAwait(false))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private static string ToQueryString(Dictionary<string, string> nvc)
|
||||
{
|
||||
var array = (from item in nvc
|
||||
select string.Format("{0}={1}", WebUtility.UrlEncode(item.Key), WebUtility.UrlEncode(item.Value)))
|
||||
.ToArray();
|
||||
|
||||
var args = string.Join("&", array);
|
||||
|
||||
if (string.IsNullOrEmpty(args))
|
||||
{
|
||||
return args;
|
||||
}
|
||||
|
||||
return "?" + args;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,105 +0,0 @@
|
||||
using System;
|
||||
using System.Net.WebSockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Emby.Server.Implementations.Net;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.SocketSharp
|
||||
{
|
||||
public class SharpWebSocket : IWebSocket
|
||||
{
|
||||
/// <summary>
|
||||
/// The logger
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
|
||||
public event EventHandler<EventArgs> Closed;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the web socket.
|
||||
/// </summary>
|
||||
/// <value>The web socket.</value>
|
||||
private readonly WebSocket _webSocket;
|
||||
|
||||
private readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();
|
||||
private bool _disposed;
|
||||
|
||||
public SharpWebSocket(WebSocket socket, ILogger logger)
|
||||
{
|
||||
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||
_webSocket = socket ?? throw new ArgumentNullException(nameof(socket));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the state.
|
||||
/// </summary>
|
||||
/// <value>The state.</value>
|
||||
public WebSocketState State => _webSocket.State;
|
||||
|
||||
/// <summary>
|
||||
/// Sends the async.
|
||||
/// </summary>
|
||||
/// <param name="bytes">The bytes.</param>
|
||||
/// <param name="endOfMessage">if set to <c>true</c> [end of message].</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
public Task SendAsync(byte[] bytes, bool endOfMessage, CancellationToken cancellationToken)
|
||||
{
|
||||
return _webSocket.SendAsync(new ArraySegment<byte>(bytes), WebSocketMessageType.Binary, endOfMessage, cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the asynchronous.
|
||||
/// </summary>
|
||||
/// <param name="text">The text.</param>
|
||||
/// <param name="endOfMessage">if set to <c>true</c> [end of message].</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
public Task SendAsync(string text, bool endOfMessage, CancellationToken cancellationToken)
|
||||
{
|
||||
return _webSocket.SendAsync(new ArraySegment<byte>(Encoding.UTF8.GetBytes(text)), WebSocketMessageType.Text, endOfMessage, cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Releases unmanaged and - optionally - managed resources.
|
||||
/// </summary>
|
||||
/// <param name="dispose"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
|
||||
protected virtual void Dispose(bool dispose)
|
||||
{
|
||||
if (_disposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (dispose)
|
||||
{
|
||||
_cancellationTokenSource.Cancel();
|
||||
if (_webSocket.State == WebSocketState.Open)
|
||||
{
|
||||
_webSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, "Closed by client",
|
||||
CancellationToken.None);
|
||||
}
|
||||
Closed?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
_disposed = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the receive action.
|
||||
/// </summary>
|
||||
/// <value>The receive action.</value>
|
||||
public Action<byte[]> OnReceiveBytes { get; set; }
|
||||
}
|
||||
}
|
@ -1,135 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.WebSockets;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Emby.Server.Implementations.HttpServer;
|
||||
using Emby.Server.Implementations.Net;
|
||||
using MediaBrowser.Model.Services;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http.Extensions;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Net.Http.Headers;
|
||||
|
||||
namespace Emby.Server.Implementations.SocketSharp
|
||||
{
|
||||
public class WebSocketSharpListener : IHttpListener
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
|
||||
private CancellationTokenSource _disposeCancellationTokenSource = new CancellationTokenSource();
|
||||
private CancellationToken _disposeCancellationToken;
|
||||
|
||||
public WebSocketSharpListener(ILogger<WebSocketSharpListener> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
_disposeCancellationToken = _disposeCancellationTokenSource.Token;
|
||||
}
|
||||
|
||||
public Func<Exception, IRequest, bool, bool, Task> ErrorHandler { get; set; }
|
||||
|
||||
public Func<IHttpRequest, string, string, string, CancellationToken, Task> RequestHandler { get; set; }
|
||||
|
||||
public Action<WebSocketConnectEventArgs> WebSocketConnected { get; set; }
|
||||
|
||||
private static void LogRequest(ILogger logger, HttpRequest request)
|
||||
{
|
||||
var url = request.GetDisplayUrl();
|
||||
|
||||
logger.LogInformation("WS {Url}. UserAgent: {UserAgent}", url, request.Headers[HeaderNames.UserAgent].ToString());
|
||||
}
|
||||
|
||||
public async Task ProcessWebSocketRequest(HttpContext ctx)
|
||||
{
|
||||
try
|
||||
{
|
||||
LogRequest(_logger, ctx.Request);
|
||||
var endpoint = ctx.Connection.RemoteIpAddress.ToString();
|
||||
var url = ctx.Request.GetDisplayUrl();
|
||||
|
||||
var webSocketContext = await ctx.WebSockets.AcceptWebSocketAsync(null).ConfigureAwait(false);
|
||||
var socket = new SharpWebSocket(webSocketContext, _logger);
|
||||
|
||||
WebSocketConnected(new WebSocketConnectEventArgs
|
||||
{
|
||||
Url = url,
|
||||
QueryString = ctx.Request.Query,
|
||||
WebSocket = socket,
|
||||
Endpoint = endpoint
|
||||
});
|
||||
|
||||
WebSocketReceiveResult result;
|
||||
var message = new List<byte>();
|
||||
|
||||
do
|
||||
{
|
||||
var buffer = WebSocket.CreateServerBuffer(4096);
|
||||
result = await webSocketContext.ReceiveAsync(buffer, _disposeCancellationToken);
|
||||
message.AddRange(buffer.Array.Take(result.Count));
|
||||
|
||||
if (result.EndOfMessage)
|
||||
{
|
||||
socket.OnReceiveBytes(message.ToArray());
|
||||
message.Clear();
|
||||
}
|
||||
} while (socket.State == WebSocketState.Open && result.MessageType != WebSocketMessageType.Close);
|
||||
|
||||
|
||||
if (webSocketContext.State == WebSocketState.Open)
|
||||
{
|
||||
await webSocketContext.CloseAsync(
|
||||
result.CloseStatus ?? WebSocketCloseStatus.NormalClosure,
|
||||
result.CloseStatusDescription,
|
||||
_disposeCancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
socket.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "AcceptWebSocketAsync error");
|
||||
if (!ctx.Response.HasStarted)
|
||||
{
|
||||
ctx.Response.StatusCode = 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Task Stop()
|
||||
{
|
||||
_disposeCancellationTokenSource.Cancel();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Releases the unmanaged resources and disposes of the managed resources used.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
private bool _disposed;
|
||||
|
||||
/// <summary>
|
||||
/// Releases the unmanaged resources and disposes of the managed resources used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">Whether or not the managed resources should be disposed.</param>
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (_disposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (disposing)
|
||||
{
|
||||
Stop().GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
_disposed = true;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.Net;
|
||||
|
||||
namespace Emby.Server.Implementations.WebSockets
|
||||
{
|
||||
public interface IWebSocketHandler
|
||||
{
|
||||
Task ProcessMessage(WebSocketMessage<object> message, TaskCompletionSource<bool> taskCompletionSource);
|
||||
}
|
||||
}
|
@ -1,102 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.WebSockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.Net;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using UtfUnknown;
|
||||
|
||||
namespace Emby.Server.Implementations.WebSockets
|
||||
{
|
||||
public class WebSocketManager
|
||||
{
|
||||
private readonly IWebSocketHandler[] _webSocketHandlers;
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
private readonly ILogger<WebSocketManager> _logger;
|
||||
private const int BufferSize = 4096;
|
||||
|
||||
public WebSocketManager(IWebSocketHandler[] webSocketHandlers, IJsonSerializer jsonSerializer, ILogger<WebSocketManager> logger)
|
||||
{
|
||||
_webSocketHandlers = webSocketHandlers;
|
||||
_jsonSerializer = jsonSerializer;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public async Task OnWebSocketConnected(WebSocket webSocket)
|
||||
{
|
||||
var taskCompletionSource = new TaskCompletionSource<bool>();
|
||||
var cancellationToken = new CancellationTokenSource().Token;
|
||||
WebSocketReceiveResult result;
|
||||
var message = new List<byte>();
|
||||
|
||||
// Keep listening for incoming messages, otherwise the socket closes automatically
|
||||
do
|
||||
{
|
||||
var buffer = WebSocket.CreateServerBuffer(BufferSize);
|
||||
result = await webSocket.ReceiveAsync(buffer, cancellationToken).ConfigureAwait(false);
|
||||
message.AddRange(buffer.Array.Take(result.Count));
|
||||
|
||||
if (result.EndOfMessage)
|
||||
{
|
||||
await ProcessMessage(message.ToArray(), taskCompletionSource).ConfigureAwait(false);
|
||||
message.Clear();
|
||||
}
|
||||
} while (!taskCompletionSource.Task.IsCompleted &&
|
||||
webSocket.State == WebSocketState.Open &&
|
||||
result.MessageType != WebSocketMessageType.Close);
|
||||
|
||||
if (webSocket.State == WebSocketState.Open)
|
||||
{
|
||||
await webSocket.CloseAsync(
|
||||
result.CloseStatus ?? WebSocketCloseStatus.NormalClosure,
|
||||
result.CloseStatusDescription,
|
||||
cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task ProcessMessage(byte[] messageBytes, TaskCompletionSource<bool> taskCompletionSource)
|
||||
{
|
||||
var charset = CharsetDetector.DetectFromBytes(messageBytes).Detected?.EncodingName;
|
||||
var message = string.Equals(charset, "utf-8", StringComparison.OrdinalIgnoreCase)
|
||||
? Encoding.UTF8.GetString(messageBytes, 0, messageBytes.Length)
|
||||
: Encoding.ASCII.GetString(messageBytes, 0, messageBytes.Length);
|
||||
|
||||
// All messages are expected to be valid JSON objects
|
||||
if (!message.StartsWith("{", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
_logger.LogDebug("Received web socket message that is not a json structure: {Message}", message);
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var info = _jsonSerializer.DeserializeFromString<WebSocketMessage<object>>(message);
|
||||
|
||||
_logger.LogDebug("Websocket message received: {0}", info.MessageType);
|
||||
|
||||
var tasks = _webSocketHandlers.Select(handler => Task.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
handler.ProcessMessage(info, taskCompletionSource).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "{HandlerType} failed processing WebSocket message {MessageType}",
|
||||
handler.GetType().Name, info.MessageType ?? string.Empty);
|
||||
}
|
||||
}));
|
||||
|
||||
await Task.WhenAll(tasks);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Error processing web socket message");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,154 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// An entity referencing an activity log entry.
|
||||
/// </summary>
|
||||
public partial class ActivityLog : ISavingChanges
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ActivityLog"/> class.
|
||||
/// Public constructor with required data.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="type">The type.</param>
|
||||
/// <param name="userId">The user id.</param>
|
||||
public ActivityLog(string name, string type, Guid userId)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(name));
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(type))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(type));
|
||||
}
|
||||
|
||||
this.Name = name;
|
||||
this.Type = type;
|
||||
this.UserId = userId;
|
||||
this.DateCreated = DateTime.UtcNow;
|
||||
this.LogSeverity = LogLevel.Trace;
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ActivityLog"/> class.
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected ActivityLog()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="type">The type.</param>
|
||||
/// <param name="userId">The user's id.</param>
|
||||
/// <returns>The new <see cref="ActivityLog"/> instance.</returns>
|
||||
public static ActivityLog Create(string name, string type, Guid userId)
|
||||
{
|
||||
return new ActivityLog(name, type, userId);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the identity of this instance.
|
||||
/// This is the key in the backing database.
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// Required, Max length = 512.
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(512)]
|
||||
[StringLength(512)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the overview.
|
||||
/// Max length = 512.
|
||||
/// </summary>
|
||||
[MaxLength(512)]
|
||||
[StringLength(512)]
|
||||
public string Overview { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the short overview.
|
||||
/// Max length = 512.
|
||||
/// </summary>
|
||||
[MaxLength(512)]
|
||||
[StringLength(512)]
|
||||
public string ShortOverview { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type.
|
||||
/// Required, Max length = 256.
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(256)]
|
||||
[StringLength(256)]
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user id.
|
||||
/// Required.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the item id.
|
||||
/// Max length = 256.
|
||||
/// </summary>
|
||||
[MaxLength(256)]
|
||||
[StringLength(256)]
|
||||
public string ItemId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the date created. This should be in UTC.
|
||||
/// Required.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime DateCreated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the log severity. Default is <see cref="LogLevel.Trace"/>.
|
||||
/// Required.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public LogLevel LogSeverity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the row version.
|
||||
/// Required, ConcurrencyToken.
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
partial void Init();
|
||||
|
||||
/// <inheritdoc />
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,208 +1,195 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class Artwork
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Artwork()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Artwork CreateArtworkUnsafe()
|
||||
{
|
||||
return new Artwork();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="kind"></param>
|
||||
/// <param name="_metadata0"></param>
|
||||
/// <param name="_personrole1"></param>
|
||||
public Artwork(string path, global::Jellyfin.Data.Enums.ArtKind kind, global::Jellyfin.Data.Entities.Metadata _metadata0, global::Jellyfin.Data.Entities.PersonRole _personrole1)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
|
||||
this.Path = path;
|
||||
|
||||
this.Kind = kind;
|
||||
|
||||
if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
|
||||
_metadata0.Artwork.Add(this);
|
||||
|
||||
if (_personrole1 == null) throw new ArgumentNullException(nameof(_personrole1));
|
||||
_personrole1.Artwork = this;
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="kind"></param>
|
||||
/// <param name="_metadata0"></param>
|
||||
/// <param name="_personrole1"></param>
|
||||
public static Artwork Create(string path, global::Jellyfin.Data.Enums.ArtKind kind, global::Jellyfin.Data.Entities.Metadata _metadata0, global::Jellyfin.Data.Entities.PersonRole _personrole1)
|
||||
{
|
||||
return new Artwork(path, kind, _metadata0, _personrole1);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class Artwork
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Artwork()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Artwork CreateArtworkUnsafe()
|
||||
{
|
||||
return new Artwork();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="kind"></param>
|
||||
/// <param name="_metadata0"></param>
|
||||
/// <param name="_personrole1"></param>
|
||||
public Artwork(string path, Enums.ArtKind kind, Metadata _metadata0, PersonRole _personrole1)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
|
||||
this.Path = path;
|
||||
|
||||
this.Kind = kind;
|
||||
|
||||
if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
|
||||
_metadata0.Artwork.Add(this);
|
||||
|
||||
if (_personrole1 == null) throw new ArgumentNullException(nameof(_personrole1));
|
||||
_personrole1.Artwork = this;
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="kind"></param>
|
||||
/// <param name="_metadata0"></param>
|
||||
/// <param name="_personrole1"></param>
|
||||
public static Artwork Create(string path, Enums.ArtKind kind, Metadata _metadata0, PersonRole _personrole1)
|
||||
{
|
||||
return new Artwork(path, kind, _metadata0, _personrole1);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Id = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Path
|
||||
/// </summary>
|
||||
protected string _Path;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Path to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetPath(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Path to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetPath(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Max length = 65535
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(65535)]
|
||||
[StringLength(65535)]
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Path;
|
||||
GetPath(ref value);
|
||||
return (_Path = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
_Id = value;
|
||||
string oldValue = _Path;
|
||||
SetPath(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Path = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Path
|
||||
/// </summary>
|
||||
protected string _Path;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Path to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetPath(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Path to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetPath(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Max length = 65535
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(65535)]
|
||||
[StringLength(65535)]
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Path;
|
||||
GetPath(ref value);
|
||||
return (_Path = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Path;
|
||||
SetPath(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Kind
|
||||
/// </summary>
|
||||
internal Enums.ArtKind _Kind;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Kind to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetKind(Enums.ArtKind oldValue, ref Enums.ArtKind newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Kind to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetKind(ref Enums.ArtKind result);
|
||||
|
||||
/// <summary>
|
||||
/// Indexed, Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Enums.ArtKind Kind
|
||||
{
|
||||
get
|
||||
{
|
||||
_Path = value;
|
||||
Enums.ArtKind value = _Kind;
|
||||
GetKind(ref value);
|
||||
return (_Kind = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Kind
|
||||
/// </summary>
|
||||
internal global::Jellyfin.Data.Enums.ArtKind _Kind;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Kind to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetKind(global::Jellyfin.Data.Enums.ArtKind oldValue, ref global::Jellyfin.Data.Enums.ArtKind newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Kind to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetKind(ref global::Jellyfin.Data.Enums.ArtKind result);
|
||||
|
||||
/// <summary>
|
||||
/// Indexed, Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public global::Jellyfin.Data.Enums.ArtKind Kind
|
||||
{
|
||||
get
|
||||
{
|
||||
global::Jellyfin.Data.Enums.ArtKind value = _Kind;
|
||||
GetKind(ref value);
|
||||
return (_Kind = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
global::Jellyfin.Data.Enums.ArtKind oldValue = _Kind;
|
||||
SetKind(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
set
|
||||
{
|
||||
_Kind = value;
|
||||
Enums.ArtKind oldValue = _Kind;
|
||||
SetKind(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Kind = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required, ConcurrenyToken
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public byte[] Timestamp { get; set; }
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,84 +1,69 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class Book: global::Jellyfin.Data.Entities.LibraryItem
|
||||
{
|
||||
partial void Init();
|
||||
public partial class Book : LibraryItem
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Book(): base()
|
||||
{
|
||||
BookMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.BookMetadata>();
|
||||
Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Book()
|
||||
{
|
||||
BookMetadata = new HashSet<BookMetadata>();
|
||||
Releases = new HashSet<Release>();
|
||||
|
||||
Init();
|
||||
}
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Book CreateBookUnsafe()
|
||||
{
|
||||
return new Book();
|
||||
}
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Book CreateBookUnsafe()
|
||||
{
|
||||
return new Book();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
public Book(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
this.UrlId = urlid;
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
public Book(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
this.UrlId = urlid;
|
||||
|
||||
this.BookMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.BookMetadata>();
|
||||
this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
|
||||
this.BookMetadata = new HashSet<BookMetadata>();
|
||||
this.Releases = new HashSet<Release>();
|
||||
|
||||
Init();
|
||||
}
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
public static Book Create(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
return new Book(urlid, dateadded);
|
||||
}
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
public static Book Create(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
return new Book(urlid, dateadded);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.BookMetadata> BookMetadata { get; protected set; }
|
||||
[ForeignKey("BookMetadata_BookMetadata_Id")]
|
||||
public virtual ICollection<BookMetadata> BookMetadata { get; protected set; }
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.Release> Releases { get; protected set; }
|
||||
[ForeignKey("Release_Releases_Id")]
|
||||
public virtual ICollection<Release> Releases { get; protected set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,123 +1,107 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class BookMetadata: global::Jellyfin.Data.Entities.Metadata
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected BookMetadata(): base()
|
||||
{
|
||||
Publishers = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static BookMetadata CreateBookMetadataUnsafe()
|
||||
{
|
||||
return new BookMetadata();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_book0"></param>
|
||||
public BookMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Book _book0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
|
||||
this.Title = title;
|
||||
|
||||
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
|
||||
this.Language = language;
|
||||
|
||||
if (_book0 == null) throw new ArgumentNullException(nameof(_book0));
|
||||
_book0.BookMetadata.Add(this);
|
||||
|
||||
this.Publishers = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_book0"></param>
|
||||
public static BookMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Book _book0)
|
||||
{
|
||||
return new BookMetadata(title, language, dateadded, datemodified, _book0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for ISBN
|
||||
/// </summary>
|
||||
protected long? _ISBN;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of ISBN to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetISBN(long? oldValue, ref long? newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of ISBN to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetISBN(ref long? result);
|
||||
|
||||
public long? ISBN
|
||||
{
|
||||
get
|
||||
{
|
||||
long? value = _ISBN;
|
||||
GetISBN(ref value);
|
||||
return (_ISBN = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
long? oldValue = _ISBN;
|
||||
SetISBN(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class BookMetadata : Metadata
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected BookMetadata()
|
||||
{
|
||||
Publishers = new HashSet<Company>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static BookMetadata CreateBookMetadataUnsafe()
|
||||
{
|
||||
return new BookMetadata();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_book0"></param>
|
||||
public BookMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Book _book0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
|
||||
this.Title = title;
|
||||
|
||||
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
|
||||
this.Language = language;
|
||||
|
||||
if (_book0 == null) throw new ArgumentNullException(nameof(_book0));
|
||||
_book0.BookMetadata.Add(this);
|
||||
|
||||
this.Publishers = new HashSet<Company>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_book0"></param>
|
||||
public static BookMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Book _book0)
|
||||
{
|
||||
return new BookMetadata(title, language, dateadded, datemodified, _book0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for ISBN
|
||||
/// </summary>
|
||||
protected long? _ISBN;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of ISBN to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetISBN(long? oldValue, ref long? newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of ISBN to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetISBN(ref long? result);
|
||||
|
||||
public long? ISBN
|
||||
{
|
||||
get
|
||||
{
|
||||
long? value = _ISBN;
|
||||
GetISBN(ref value);
|
||||
return (_ISBN = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
_ISBN = value;
|
||||
long? oldValue = _ISBN;
|
||||
SetISBN(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_ISBN = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.Company> Publishers { get; protected set; }
|
||||
[ForeignKey("Company_Publishers_Id")]
|
||||
public virtual ICollection<Company> Publishers { get; protected set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,274 +1,263 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class Chapter
|
||||
{
|
||||
partial void Init();
|
||||
public partial class Chapter
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Chapter()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Chapter()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Chapter CreateChapterUnsafe()
|
||||
{
|
||||
return new Chapter();
|
||||
}
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Chapter CreateChapterUnsafe()
|
||||
{
|
||||
return new Chapter();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="timestart"></param>
|
||||
/// <param name="_release0"></param>
|
||||
public Chapter(string language, long timestart, global::Jellyfin.Data.Entities.Release _release0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
|
||||
this.Language = language;
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="timestart"></param>
|
||||
/// <param name="_release0"></param>
|
||||
public Chapter(string language, long timestart, Release _release0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
|
||||
this.Language = language;
|
||||
|
||||
this.TimeStart = timestart;
|
||||
this.TimeStart = timestart;
|
||||
|
||||
if (_release0 == null) throw new ArgumentNullException(nameof(_release0));
|
||||
_release0.Chapters.Add(this);
|
||||
if (_release0 == null) throw new ArgumentNullException(nameof(_release0));
|
||||
_release0.Chapters.Add(this);
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="timestart"></param>
|
||||
/// <param name="_release0"></param>
|
||||
public static Chapter Create(string language, long timestart, global::Jellyfin.Data.Entities.Release _release0)
|
||||
{
|
||||
return new Chapter(language, timestart, _release0);
|
||||
}
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="timestart"></param>
|
||||
/// <param name="_release0"></param>
|
||||
public static Chapter Create(string language, long timestart, Release _release0)
|
||||
{
|
||||
return new Chapter(language, timestart, _release0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
_Id = value;
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Id = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Name
|
||||
/// </summary>
|
||||
protected string _Name;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetName(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetName(ref string result);
|
||||
/// <summary>
|
||||
/// Backing field for Name
|
||||
/// </summary>
|
||||
protected string _Name;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetName(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetName(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Name;
|
||||
GetName(ref value);
|
||||
return (_Name = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Name;
|
||||
SetName(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
_Name = value;
|
||||
string value = _Name;
|
||||
GetName(ref value);
|
||||
return (_Name = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Name;
|
||||
SetName(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Name = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Language
|
||||
/// </summary>
|
||||
protected string _Language;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Language to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetLanguage(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Language to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetLanguage(ref string result);
|
||||
/// <summary>
|
||||
/// Backing field for Language
|
||||
/// </summary>
|
||||
protected string _Language;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Language to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetLanguage(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Language to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetLanguage(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Min length = 3, Max length = 3
|
||||
/// ISO-639-3 3-character language codes
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MinLength(3)]
|
||||
[MaxLength(3)]
|
||||
[StringLength(3)]
|
||||
public string Language
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Language;
|
||||
GetLanguage(ref value);
|
||||
return (_Language = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Language;
|
||||
SetLanguage(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
/// <summary>
|
||||
/// Required, Min length = 3, Max length = 3
|
||||
/// ISO-639-3 3-character language codes
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MinLength(3)]
|
||||
[MaxLength(3)]
|
||||
[StringLength(3)]
|
||||
public string Language
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Language;
|
||||
GetLanguage(ref value);
|
||||
return (_Language = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
_Language = value;
|
||||
string oldValue = _Language;
|
||||
SetLanguage(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Language = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for TimeStart
|
||||
/// </summary>
|
||||
protected long _TimeStart;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of TimeStart to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetTimeStart(long oldValue, ref long newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of TimeStart to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetTimeStart(ref long result);
|
||||
/// <summary>
|
||||
/// Backing field for TimeStart
|
||||
/// </summary>
|
||||
protected long _TimeStart;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of TimeStart to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetTimeStart(long oldValue, ref long newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of TimeStart to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetTimeStart(ref long result);
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public long TimeStart
|
||||
{
|
||||
get
|
||||
{
|
||||
long value = _TimeStart;
|
||||
GetTimeStart(ref value);
|
||||
return (_TimeStart = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
long oldValue = _TimeStart;
|
||||
SetTimeStart(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public long TimeStart
|
||||
{
|
||||
get
|
||||
{
|
||||
long value = _TimeStart;
|
||||
GetTimeStart(ref value);
|
||||
return (_TimeStart = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
_TimeStart = value;
|
||||
long oldValue = _TimeStart;
|
||||
SetTimeStart(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_TimeStart = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for TimeEnd
|
||||
/// </summary>
|
||||
protected long? _TimeEnd;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of TimeEnd to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetTimeEnd(long? oldValue, ref long? newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of TimeEnd to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetTimeEnd(ref long? result);
|
||||
/// <summary>
|
||||
/// Backing field for TimeEnd
|
||||
/// </summary>
|
||||
protected long? _TimeEnd;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of TimeEnd to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetTimeEnd(long? oldValue, ref long? newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of TimeEnd to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetTimeEnd(ref long? result);
|
||||
|
||||
public long? TimeEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
long? value = _TimeEnd;
|
||||
GetTimeEnd(ref value);
|
||||
return (_TimeEnd = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
long? oldValue = _TimeEnd;
|
||||
SetTimeEnd(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public long? TimeEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
_TimeEnd = value;
|
||||
long? value = _TimeEnd;
|
||||
GetTimeEnd(ref value);
|
||||
return (_TimeEnd = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
long? oldValue = _TimeEnd;
|
||||
SetTimeEnd(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_TimeEnd = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required, ConcurrenyToken
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public byte[] Timestamp { get; set; }
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,131 +1,120 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class Collection
|
||||
{
|
||||
partial void Init();
|
||||
public partial class Collection
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor
|
||||
/// </summary>
|
||||
public Collection()
|
||||
{
|
||||
CollectionItem = new System.Collections.Generic.LinkedList<global::Jellyfin.Data.Entities.CollectionItem>();
|
||||
/// <summary>
|
||||
/// Default constructor
|
||||
/// </summary>
|
||||
public Collection()
|
||||
{
|
||||
CollectionItem = new LinkedList<CollectionItem>();
|
||||
|
||||
Init();
|
||||
}
|
||||
Init();
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
_Id = value;
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Id = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Name
|
||||
/// </summary>
|
||||
protected string _Name;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetName(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetName(ref string result);
|
||||
/// <summary>
|
||||
/// Backing field for Name
|
||||
/// </summary>
|
||||
protected string _Name;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetName(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetName(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Name;
|
||||
GetName(ref value);
|
||||
return (_Name = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Name;
|
||||
SetName(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Name;
|
||||
GetName(ref value);
|
||||
return (_Name = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
_Name = value;
|
||||
string oldValue = _Name;
|
||||
SetName(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Name = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public byte[] Timestamp { get; set; }
|
||||
/// <summary>
|
||||
/// Required, ConcurrenyToken
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.CollectionItem> CollectionItem { get; protected set; }
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
[ForeignKey("CollectionItem_CollectionItem_Id")]
|
||||
public virtual ICollection<CollectionItem> CollectionItem { get; protected set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,151 +1,143 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class CollectionItem
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected CollectionItem()
|
||||
{
|
||||
// NOTE: This class has one-to-one associations with CollectionItem.
|
||||
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static CollectionItem CreateCollectionItemUnsafe()
|
||||
{
|
||||
return new CollectionItem();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="_collection0"></param>
|
||||
/// <param name="_collectionitem1"></param>
|
||||
/// <param name="_collectionitem2"></param>
|
||||
public CollectionItem(global::Jellyfin.Data.Entities.Collection _collection0, global::Jellyfin.Data.Entities.CollectionItem _collectionitem1, global::Jellyfin.Data.Entities.CollectionItem _collectionitem2)
|
||||
{
|
||||
// NOTE: This class has one-to-one associations with CollectionItem.
|
||||
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
|
||||
|
||||
if (_collection0 == null) throw new ArgumentNullException(nameof(_collection0));
|
||||
_collection0.CollectionItem.Add(this);
|
||||
|
||||
if (_collectionitem1 == null) throw new ArgumentNullException(nameof(_collectionitem1));
|
||||
_collectionitem1.Next = this;
|
||||
|
||||
if (_collectionitem2 == null) throw new ArgumentNullException(nameof(_collectionitem2));
|
||||
_collectionitem2.Previous = this;
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="_collection0"></param>
|
||||
/// <param name="_collectionitem1"></param>
|
||||
/// <param name="_collectionitem2"></param>
|
||||
public static CollectionItem Create(global::Jellyfin.Data.Entities.Collection _collection0, global::Jellyfin.Data.Entities.CollectionItem _collectionitem1, global::Jellyfin.Data.Entities.CollectionItem _collectionitem2)
|
||||
{
|
||||
return new CollectionItem(_collection0, _collectionitem1, _collectionitem2);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class CollectionItem
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected CollectionItem()
|
||||
{
|
||||
// NOTE: This class has one-to-one associations with CollectionItem.
|
||||
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static CollectionItem CreateCollectionItemUnsafe()
|
||||
{
|
||||
return new CollectionItem();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="_collection0"></param>
|
||||
/// <param name="_collectionitem1"></param>
|
||||
/// <param name="_collectionitem2"></param>
|
||||
public CollectionItem(Collection _collection0, CollectionItem _collectionitem1, CollectionItem _collectionitem2)
|
||||
{
|
||||
// NOTE: This class has one-to-one associations with CollectionItem.
|
||||
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
|
||||
|
||||
if (_collection0 == null) throw new ArgumentNullException(nameof(_collection0));
|
||||
_collection0.CollectionItem.Add(this);
|
||||
|
||||
if (_collectionitem1 == null) throw new ArgumentNullException(nameof(_collectionitem1));
|
||||
_collectionitem1.Next = this;
|
||||
|
||||
if (_collectionitem2 == null) throw new ArgumentNullException(nameof(_collectionitem2));
|
||||
_collectionitem2.Previous = this;
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="_collection0"></param>
|
||||
/// <param name="_collectionitem1"></param>
|
||||
/// <param name="_collectionitem2"></param>
|
||||
public static CollectionItem Create(Collection _collection0, CollectionItem _collectionitem1, CollectionItem _collectionitem2)
|
||||
{
|
||||
return new CollectionItem(_collection0, _collectionitem1, _collectionitem2);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
_Id = value;
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Id = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public byte[] Timestamp { get; set; }
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
public virtual global::Jellyfin.Data.Entities.LibraryItem LibraryItem { get; set; }
|
||||
|
||||
/// <remarks>
|
||||
/// TODO check if this properly updated dependant and has the proper principal relationship
|
||||
/// </remarks>
|
||||
public virtual global::Jellyfin.Data.Entities.CollectionItem Next { get; set; }
|
||||
|
||||
/// <remarks>
|
||||
/// TODO check if this properly updated dependant and has the proper principal relationship
|
||||
/// </remarks>
|
||||
public virtual global::Jellyfin.Data.Entities.CollectionItem Previous { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required, ConcurrenyToken
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ForeignKey("LibraryItem_Id")]
|
||||
public virtual LibraryItem LibraryItem { get; set; }
|
||||
|
||||
/// <remarks>
|
||||
/// TODO check if this properly updated dependant and has the proper principal relationship
|
||||
/// </remarks>
|
||||
[ForeignKey("CollectionItem_Next_Id")]
|
||||
public virtual CollectionItem Next { get; set; }
|
||||
|
||||
/// <remarks>
|
||||
/// TODO check if this properly updated dependant and has the proper principal relationship
|
||||
/// </remarks>
|
||||
[ForeignKey("CollectionItem_Previous_Id")]
|
||||
public virtual CollectionItem Previous { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,147 +1,137 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class Company
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Company()
|
||||
{
|
||||
CompanyMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.CompanyMetadata>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Company CreateCompanyUnsafe()
|
||||
{
|
||||
return new Company();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="_moviemetadata0"></param>
|
||||
/// <param name="_seriesmetadata1"></param>
|
||||
/// <param name="_musicalbummetadata2"></param>
|
||||
/// <param name="_bookmetadata3"></param>
|
||||
/// <param name="_company4"></param>
|
||||
public Company(global::Jellyfin.Data.Entities.MovieMetadata _moviemetadata0, global::Jellyfin.Data.Entities.SeriesMetadata _seriesmetadata1, global::Jellyfin.Data.Entities.MusicAlbumMetadata _musicalbummetadata2, global::Jellyfin.Data.Entities.BookMetadata _bookmetadata3, global::Jellyfin.Data.Entities.Company _company4)
|
||||
{
|
||||
if (_moviemetadata0 == null) throw new ArgumentNullException(nameof(_moviemetadata0));
|
||||
_moviemetadata0.Studios.Add(this);
|
||||
|
||||
if (_seriesmetadata1 == null) throw new ArgumentNullException(nameof(_seriesmetadata1));
|
||||
_seriesmetadata1.Networks.Add(this);
|
||||
|
||||
if (_musicalbummetadata2 == null) throw new ArgumentNullException(nameof(_musicalbummetadata2));
|
||||
_musicalbummetadata2.Labels.Add(this);
|
||||
|
||||
if (_bookmetadata3 == null) throw new ArgumentNullException(nameof(_bookmetadata3));
|
||||
_bookmetadata3.Publishers.Add(this);
|
||||
|
||||
if (_company4 == null) throw new ArgumentNullException(nameof(_company4));
|
||||
_company4.Parent = this;
|
||||
|
||||
this.CompanyMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.CompanyMetadata>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="_moviemetadata0"></param>
|
||||
/// <param name="_seriesmetadata1"></param>
|
||||
/// <param name="_musicalbummetadata2"></param>
|
||||
/// <param name="_bookmetadata3"></param>
|
||||
/// <param name="_company4"></param>
|
||||
public static Company Create(global::Jellyfin.Data.Entities.MovieMetadata _moviemetadata0, global::Jellyfin.Data.Entities.SeriesMetadata _seriesmetadata1, global::Jellyfin.Data.Entities.MusicAlbumMetadata _musicalbummetadata2, global::Jellyfin.Data.Entities.BookMetadata _bookmetadata3, global::Jellyfin.Data.Entities.Company _company4)
|
||||
{
|
||||
return new Company(_moviemetadata0, _seriesmetadata1, _musicalbummetadata2, _bookmetadata3, _company4);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class Company
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Company()
|
||||
{
|
||||
CompanyMetadata = new HashSet<CompanyMetadata>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Company CreateCompanyUnsafe()
|
||||
{
|
||||
return new Company();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="_moviemetadata0"></param>
|
||||
/// <param name="_seriesmetadata1"></param>
|
||||
/// <param name="_musicalbummetadata2"></param>
|
||||
/// <param name="_bookmetadata3"></param>
|
||||
/// <param name="_company4"></param>
|
||||
public Company(MovieMetadata _moviemetadata0, SeriesMetadata _seriesmetadata1, MusicAlbumMetadata _musicalbummetadata2, BookMetadata _bookmetadata3, Company _company4)
|
||||
{
|
||||
if (_moviemetadata0 == null) throw new ArgumentNullException(nameof(_moviemetadata0));
|
||||
_moviemetadata0.Studios.Add(this);
|
||||
|
||||
if (_seriesmetadata1 == null) throw new ArgumentNullException(nameof(_seriesmetadata1));
|
||||
_seriesmetadata1.Networks.Add(this);
|
||||
|
||||
if (_musicalbummetadata2 == null) throw new ArgumentNullException(nameof(_musicalbummetadata2));
|
||||
_musicalbummetadata2.Labels.Add(this);
|
||||
|
||||
if (_bookmetadata3 == null) throw new ArgumentNullException(nameof(_bookmetadata3));
|
||||
_bookmetadata3.Publishers.Add(this);
|
||||
|
||||
if (_company4 == null) throw new ArgumentNullException(nameof(_company4));
|
||||
_company4.Parent = this;
|
||||
|
||||
this.CompanyMetadata = new HashSet<CompanyMetadata>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="_moviemetadata0"></param>
|
||||
/// <param name="_seriesmetadata1"></param>
|
||||
/// <param name="_musicalbummetadata2"></param>
|
||||
/// <param name="_bookmetadata3"></param>
|
||||
/// <param name="_company4"></param>
|
||||
public static Company Create(MovieMetadata _moviemetadata0, SeriesMetadata _seriesmetadata1, MusicAlbumMetadata _musicalbummetadata2, BookMetadata _bookmetadata3, Company _company4)
|
||||
{
|
||||
return new Company(_moviemetadata0, _seriesmetadata1, _musicalbummetadata2, _bookmetadata3, _company4);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
_Id = value;
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public byte[] Timestamp { get; set; }
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.CompanyMetadata> CompanyMetadata { get; protected set; }
|
||||
|
||||
public virtual global::Jellyfin.Data.Entities.Company Parent { get; set; }
|
||||
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Id = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required, ConcurrenyToken
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
[ForeignKey("CompanyMetadata_CompanyMetadata_Id")]
|
||||
public virtual ICollection<CompanyMetadata> CompanyMetadata { get; protected set; }
|
||||
[ForeignKey("Company_Parent_Id")]
|
||||
public virtual Company Parent { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,234 +1,216 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class CompanyMetadata: global::Jellyfin.Data.Entities.Metadata
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected CompanyMetadata(): base()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static CompanyMetadata CreateCompanyMetadataUnsafe()
|
||||
{
|
||||
return new CompanyMetadata();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_company0"></param>
|
||||
public CompanyMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Company _company0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
|
||||
this.Title = title;
|
||||
|
||||
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
|
||||
this.Language = language;
|
||||
|
||||
if (_company0 == null) throw new ArgumentNullException(nameof(_company0));
|
||||
_company0.CompanyMetadata.Add(this);
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_company0"></param>
|
||||
public static CompanyMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Company _company0)
|
||||
{
|
||||
return new CompanyMetadata(title, language, dateadded, datemodified, _company0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Description
|
||||
/// </summary>
|
||||
protected string _Description;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Description to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetDescription(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Description to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetDescription(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 65535
|
||||
/// </summary>
|
||||
[MaxLength(65535)]
|
||||
[StringLength(65535)]
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Description;
|
||||
GetDescription(ref value);
|
||||
return (_Description = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Description;
|
||||
SetDescription(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class CompanyMetadata : Metadata
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected CompanyMetadata()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static CompanyMetadata CreateCompanyMetadataUnsafe()
|
||||
{
|
||||
return new CompanyMetadata();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_company0"></param>
|
||||
public CompanyMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Company _company0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
|
||||
this.Title = title;
|
||||
|
||||
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
|
||||
this.Language = language;
|
||||
|
||||
if (_company0 == null) throw new ArgumentNullException(nameof(_company0));
|
||||
_company0.CompanyMetadata.Add(this);
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_company0"></param>
|
||||
public static CompanyMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Company _company0)
|
||||
{
|
||||
return new CompanyMetadata(title, language, dateadded, datemodified, _company0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Description
|
||||
/// </summary>
|
||||
protected string _Description;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Description to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetDescription(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Description to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetDescription(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 65535
|
||||
/// </summary>
|
||||
[MaxLength(65535)]
|
||||
[StringLength(65535)]
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Description;
|
||||
GetDescription(ref value);
|
||||
return (_Description = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Description;
|
||||
SetDescription(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Description = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Headquarters
|
||||
/// </summary>
|
||||
protected string _Headquarters;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Headquarters to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetHeadquarters(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Headquarters to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetHeadquarters(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 255
|
||||
/// </summary>
|
||||
[MaxLength(255)]
|
||||
[StringLength(255)]
|
||||
public string Headquarters
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Headquarters;
|
||||
GetHeadquarters(ref value);
|
||||
return (_Headquarters = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Headquarters;
|
||||
SetHeadquarters(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Headquarters = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Country
|
||||
/// </summary>
|
||||
protected string _Country;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Country to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetCountry(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Country to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetCountry(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 2
|
||||
/// </summary>
|
||||
[MaxLength(2)]
|
||||
[StringLength(2)]
|
||||
public string Country
|
||||
{
|
||||
get
|
||||
{
|
||||
_Description = value;
|
||||
string value = _Country;
|
||||
GetCountry(ref value);
|
||||
return (_Country = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Headquarters
|
||||
/// </summary>
|
||||
protected string _Headquarters;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Headquarters to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetHeadquarters(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Headquarters to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetHeadquarters(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 255
|
||||
/// </summary>
|
||||
[MaxLength(255)]
|
||||
[StringLength(255)]
|
||||
public string Headquarters
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Headquarters;
|
||||
GetHeadquarters(ref value);
|
||||
return (_Headquarters = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Headquarters;
|
||||
SetHeadquarters(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
set
|
||||
{
|
||||
_Headquarters = value;
|
||||
string oldValue = _Country;
|
||||
SetCountry(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Country = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Country
|
||||
/// </summary>
|
||||
protected string _Country;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Country to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetCountry(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Country to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetCountry(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 2
|
||||
/// </summary>
|
||||
[MaxLength(2)]
|
||||
[StringLength(2)]
|
||||
public string Country
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Country;
|
||||
GetCountry(ref value);
|
||||
return (_Country = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Country;
|
||||
SetCountry(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Homepage
|
||||
/// </summary>
|
||||
protected string _Homepage;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Homepage to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetHomepage(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Homepage to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetHomepage(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Homepage
|
||||
{
|
||||
get
|
||||
{
|
||||
_Country = value;
|
||||
string value = _Homepage;
|
||||
GetHomepage(ref value);
|
||||
return (_Homepage = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Homepage
|
||||
/// </summary>
|
||||
protected string _Homepage;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Homepage to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetHomepage(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Homepage to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetHomepage(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Homepage
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Homepage;
|
||||
GetHomepage(ref value);
|
||||
return (_Homepage = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Homepage;
|
||||
SetHomepage(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
set
|
||||
{
|
||||
_Homepage = value;
|
||||
string oldValue = _Homepage;
|
||||
SetHomepage(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Homepage = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,84 +1,68 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class CustomItem: global::Jellyfin.Data.Entities.LibraryItem
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected CustomItem(): base()
|
||||
{
|
||||
CustomItemMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.CustomItemMetadata>();
|
||||
Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
|
||||
public partial class CustomItem : LibraryItem
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
Init();
|
||||
}
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected CustomItem()
|
||||
{
|
||||
CustomItemMetadata = new HashSet<CustomItemMetadata>();
|
||||
Releases = new HashSet<Release>();
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static CustomItem CreateCustomItemUnsafe()
|
||||
{
|
||||
return new CustomItem();
|
||||
}
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
public CustomItem(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
this.UrlId = urlid;
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static CustomItem CreateCustomItemUnsafe()
|
||||
{
|
||||
return new CustomItem();
|
||||
}
|
||||
|
||||
this.CustomItemMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.CustomItemMetadata>();
|
||||
this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
public CustomItem(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
this.UrlId = urlid;
|
||||
|
||||
Init();
|
||||
}
|
||||
this.CustomItemMetadata = new HashSet<CustomItemMetadata>();
|
||||
this.Releases = new HashSet<Release>();
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
public static CustomItem Create(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
return new CustomItem(urlid, dateadded);
|
||||
}
|
||||
Init();
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
public static CustomItem Create(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
return new CustomItem(urlid, dateadded);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.CustomItemMetadata> CustomItemMetadata { get; protected set; }
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
[ForeignKey("CustomItemMetadata_CustomItemMetadata_Id")]
|
||||
public virtual ICollection<CustomItemMetadata> CustomItemMetadata { get; protected set; }
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.Release> Releases { get; protected set; }
|
||||
[ForeignKey("Release_Releases_Id")]
|
||||
public virtual ICollection<Release> Releases { get; protected set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,86 +1,67 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class CustomItemMetadata: global::Jellyfin.Data.Entities.Metadata
|
||||
{
|
||||
partial void Init();
|
||||
public partial class CustomItemMetadata : Metadata
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected CustomItemMetadata(): base()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected CustomItemMetadata()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static CustomItemMetadata CreateCustomItemMetadataUnsafe()
|
||||
{
|
||||
return new CustomItemMetadata();
|
||||
}
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static CustomItemMetadata CreateCustomItemMetadataUnsafe()
|
||||
{
|
||||
return new CustomItemMetadata();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_customitem0"></param>
|
||||
public CustomItemMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.CustomItem _customitem0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
|
||||
this.Title = title;
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_customitem0"></param>
|
||||
public CustomItemMetadata(string title, string language, DateTime dateadded, DateTime datemodified, CustomItem _customitem0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
|
||||
this.Title = title;
|
||||
|
||||
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
|
||||
this.Language = language;
|
||||
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
|
||||
this.Language = language;
|
||||
|
||||
if (_customitem0 == null) throw new ArgumentNullException(nameof(_customitem0));
|
||||
_customitem0.CustomItemMetadata.Add(this);
|
||||
if (_customitem0 == null) throw new ArgumentNullException(nameof(_customitem0));
|
||||
_customitem0.CustomItemMetadata.Add(this);
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_customitem0"></param>
|
||||
public static CustomItemMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.CustomItem _customitem0)
|
||||
{
|
||||
return new CustomItemMetadata(title, language, dateadded, datemodified, _customitem0);
|
||||
}
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_customitem0"></param>
|
||||
public static CustomItemMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, CustomItem _customitem0)
|
||||
{
|
||||
return new CustomItemMetadata(title, language, dateadded, datemodified, _customitem0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,127 +1,110 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class Episode: global::Jellyfin.Data.Entities.LibraryItem
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Episode(): base()
|
||||
{
|
||||
// NOTE: This class has one-to-one associations with LibraryRoot, LibraryItem and CollectionItem.
|
||||
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
|
||||
|
||||
Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
|
||||
EpisodeMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.EpisodeMetadata>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Episode CreateEpisodeUnsafe()
|
||||
{
|
||||
return new Episode();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
/// <param name="_season0"></param>
|
||||
public Episode(Guid urlid, DateTime dateadded, global::Jellyfin.Data.Entities.Season _season0)
|
||||
{
|
||||
// NOTE: This class has one-to-one associations with LibraryRoot, LibraryItem and CollectionItem.
|
||||
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
|
||||
|
||||
this.UrlId = urlid;
|
||||
|
||||
if (_season0 == null) throw new ArgumentNullException(nameof(_season0));
|
||||
_season0.Episodes.Add(this);
|
||||
|
||||
this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
|
||||
this.EpisodeMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.EpisodeMetadata>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
/// <param name="_season0"></param>
|
||||
public static Episode Create(Guid urlid, DateTime dateadded, global::Jellyfin.Data.Entities.Season _season0)
|
||||
{
|
||||
return new Episode(urlid, dateadded, _season0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for EpisodeNumber
|
||||
/// </summary>
|
||||
protected int? _EpisodeNumber;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of EpisodeNumber to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetEpisodeNumber(int? oldValue, ref int? newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of EpisodeNumber to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetEpisodeNumber(ref int? result);
|
||||
|
||||
public int? EpisodeNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
int? value = _EpisodeNumber;
|
||||
GetEpisodeNumber(ref value);
|
||||
return (_EpisodeNumber = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
int? oldValue = _EpisodeNumber;
|
||||
SetEpisodeNumber(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class Episode : LibraryItem
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Episode()
|
||||
{
|
||||
// NOTE: This class has one-to-one associations with LibraryRoot, LibraryItem and CollectionItem.
|
||||
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
|
||||
|
||||
Releases = new HashSet<Release>();
|
||||
EpisodeMetadata = new HashSet<EpisodeMetadata>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Episode CreateEpisodeUnsafe()
|
||||
{
|
||||
return new Episode();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
/// <param name="_season0"></param>
|
||||
public Episode(Guid urlid, DateTime dateadded, Season _season0)
|
||||
{
|
||||
// NOTE: This class has one-to-one associations with LibraryRoot, LibraryItem and CollectionItem.
|
||||
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
|
||||
|
||||
this.UrlId = urlid;
|
||||
|
||||
if (_season0 == null) throw new ArgumentNullException(nameof(_season0));
|
||||
_season0.Episodes.Add(this);
|
||||
|
||||
this.Releases = new HashSet<Release>();
|
||||
this.EpisodeMetadata = new HashSet<EpisodeMetadata>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
/// <param name="_season0"></param>
|
||||
public static Episode Create(Guid urlid, DateTime dateadded, Season _season0)
|
||||
{
|
||||
return new Episode(urlid, dateadded, _season0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for EpisodeNumber
|
||||
/// </summary>
|
||||
protected int? _EpisodeNumber;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of EpisodeNumber to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetEpisodeNumber(int? oldValue, ref int? newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of EpisodeNumber to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetEpisodeNumber(ref int? result);
|
||||
|
||||
public int? EpisodeNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
_EpisodeNumber = value;
|
||||
int? value = _EpisodeNumber;
|
||||
GetEpisodeNumber(ref value);
|
||||
return (_EpisodeNumber = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.Release> Releases { get; protected set; }
|
||||
set
|
||||
{
|
||||
int? oldValue = _EpisodeNumber;
|
||||
SetEpisodeNumber(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_EpisodeNumber = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.EpisodeMetadata> EpisodeMetadata { get; protected set; }
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
[ForeignKey("Release_Releases_Id")]
|
||||
public virtual ICollection<Release> Releases { get; protected set; }
|
||||
[ForeignKey("EpisodeMetadata_EpisodeMetadata_Id")]
|
||||
public virtual ICollection<EpisodeMetadata> EpisodeMetadata { get; protected set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,197 +1,179 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class EpisodeMetadata: global::Jellyfin.Data.Entities.Metadata
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected EpisodeMetadata(): base()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static EpisodeMetadata CreateEpisodeMetadataUnsafe()
|
||||
{
|
||||
return new EpisodeMetadata();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_episode0"></param>
|
||||
public EpisodeMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Episode _episode0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
|
||||
this.Title = title;
|
||||
|
||||
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
|
||||
this.Language = language;
|
||||
|
||||
if (_episode0 == null) throw new ArgumentNullException(nameof(_episode0));
|
||||
_episode0.EpisodeMetadata.Add(this);
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_episode0"></param>
|
||||
public static EpisodeMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Episode _episode0)
|
||||
{
|
||||
return new EpisodeMetadata(title, language, dateadded, datemodified, _episode0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Outline
|
||||
/// </summary>
|
||||
protected string _Outline;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Outline to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetOutline(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Outline to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetOutline(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Outline
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Outline;
|
||||
GetOutline(ref value);
|
||||
return (_Outline = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Outline;
|
||||
SetOutline(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class EpisodeMetadata : Metadata
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected EpisodeMetadata()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static EpisodeMetadata CreateEpisodeMetadataUnsafe()
|
||||
{
|
||||
return new EpisodeMetadata();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_episode0"></param>
|
||||
public EpisodeMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Episode _episode0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
|
||||
this.Title = title;
|
||||
|
||||
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
|
||||
this.Language = language;
|
||||
|
||||
if (_episode0 == null) throw new ArgumentNullException(nameof(_episode0));
|
||||
_episode0.EpisodeMetadata.Add(this);
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_episode0"></param>
|
||||
public static EpisodeMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Episode _episode0)
|
||||
{
|
||||
return new EpisodeMetadata(title, language, dateadded, datemodified, _episode0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Outline
|
||||
/// </summary>
|
||||
protected string _Outline;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Outline to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetOutline(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Outline to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetOutline(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Outline
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Outline;
|
||||
GetOutline(ref value);
|
||||
return (_Outline = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Outline;
|
||||
SetOutline(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Outline = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Plot
|
||||
/// </summary>
|
||||
protected string _Plot;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Plot to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetPlot(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Plot to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetPlot(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 65535
|
||||
/// </summary>
|
||||
[MaxLength(65535)]
|
||||
[StringLength(65535)]
|
||||
public string Plot
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Plot;
|
||||
GetPlot(ref value);
|
||||
return (_Plot = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
_Outline = value;
|
||||
string oldValue = _Plot;
|
||||
SetPlot(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Plot = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Plot
|
||||
/// </summary>
|
||||
protected string _Plot;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Plot to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetPlot(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Plot to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetPlot(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 65535
|
||||
/// </summary>
|
||||
[MaxLength(65535)]
|
||||
[StringLength(65535)]
|
||||
public string Plot
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Plot;
|
||||
GetPlot(ref value);
|
||||
return (_Plot = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Plot;
|
||||
SetPlot(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Tagline
|
||||
/// </summary>
|
||||
protected string _Tagline;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Tagline to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetTagline(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Tagline to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetTagline(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Tagline
|
||||
{
|
||||
get
|
||||
{
|
||||
_Plot = value;
|
||||
string value = _Tagline;
|
||||
GetTagline(ref value);
|
||||
return (_Tagline = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Tagline
|
||||
/// </summary>
|
||||
protected string _Tagline;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Tagline to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetTagline(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Tagline to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetTagline(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Tagline
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Tagline;
|
||||
GetTagline(ref value);
|
||||
return (_Tagline = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Tagline;
|
||||
SetTagline(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
set
|
||||
{
|
||||
_Tagline = value;
|
||||
string oldValue = _Tagline;
|
||||
SetTagline(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Tagline = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,163 +1,152 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class Genre
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Genre()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Genre CreateGenreUnsafe()
|
||||
{
|
||||
return new Genre();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="_metadata0"></param>
|
||||
public Genre(string name, global::Jellyfin.Data.Entities.Metadata _metadata0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
|
||||
this.Name = name;
|
||||
|
||||
if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
|
||||
_metadata0.Genres.Add(this);
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="_metadata0"></param>
|
||||
public static Genre Create(string name, global::Jellyfin.Data.Entities.Metadata _metadata0)
|
||||
{
|
||||
return new Genre(name, _metadata0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class Genre
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Genre()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Genre CreateGenreUnsafe()
|
||||
{
|
||||
return new Genre();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="_metadata0"></param>
|
||||
public Genre(string name, Metadata _metadata0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
|
||||
this.Name = name;
|
||||
|
||||
if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
|
||||
_metadata0.Genres.Add(this);
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="_metadata0"></param>
|
||||
public static Genre Create(string name, Metadata _metadata0)
|
||||
{
|
||||
return new Genre(name, _metadata0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
_Id = value;
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Id = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Name
|
||||
/// </summary>
|
||||
internal string _Name;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetName(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetName(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Indexed, Required, Max length = 255
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(255)]
|
||||
[StringLength(255)]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Name;
|
||||
GetName(ref value);
|
||||
return (_Name = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Name;
|
||||
SetName(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Name
|
||||
/// </summary>
|
||||
internal string _Name;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetName(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetName(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Indexed, Required, Max length = 255
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(255)]
|
||||
[StringLength(255)]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
_Name = value;
|
||||
string value = _Name;
|
||||
GetName(ref value);
|
||||
return (_Name = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Name;
|
||||
SetName(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Name = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required, ConcurrenyToken
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public byte[] Timestamp { get; set; }
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,115 +1,109 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class Group
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Group()
|
||||
{
|
||||
GroupPermissions = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Permission>();
|
||||
ProviderMappings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.ProviderMapping>();
|
||||
Preferences = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Preference>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Group CreateGroupUnsafe()
|
||||
{
|
||||
return new Group();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="_user0"></param>
|
||||
public Group(string name, global::Jellyfin.Data.Entities.User _user0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
|
||||
this.Name = name;
|
||||
|
||||
if (_user0 == null) throw new ArgumentNullException(nameof(_user0));
|
||||
_user0.Groups.Add(this);
|
||||
|
||||
this.GroupPermissions = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Permission>();
|
||||
this.ProviderMappings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.ProviderMapping>();
|
||||
this.Preferences = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Preference>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="_user0"></param>
|
||||
public static Group Create(string name, global::Jellyfin.Data.Entities.User _user0)
|
||||
{
|
||||
return new Group(name, _user0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Required, Max length = 255
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(255)]
|
||||
[StringLength(255)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Concurrency token
|
||||
/// </summary>
|
||||
[Timestamp]
|
||||
public Byte[] Timestamp { get; set; }
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.Permission> GroupPermissions { get; protected set; }
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.ProviderMapping> ProviderMappings { get; protected set; }
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.Preference> Preferences { get; protected set; }
|
||||
|
||||
}
|
||||
public partial class Group
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Group()
|
||||
{
|
||||
GroupPermissions = new HashSet<Permission>();
|
||||
ProviderMappings = new HashSet<ProviderMapping>();
|
||||
Preferences = new HashSet<Preference>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Group CreateGroupUnsafe()
|
||||
{
|
||||
return new Group();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="_user0"></param>
|
||||
public Group(string name, User _user0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
|
||||
this.Name = name;
|
||||
|
||||
if (_user0 == null) throw new ArgumentNullException(nameof(_user0));
|
||||
_user0.Groups.Add(this);
|
||||
|
||||
this.GroupPermissions = new HashSet<Permission>();
|
||||
this.ProviderMappings = new HashSet<ProviderMapping>();
|
||||
this.Preferences = new HashSet<Preference>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="_user0"></param>
|
||||
public static Group Create(string name, User _user0)
|
||||
{
|
||||
return new Group(name, _user0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Required, Max length = 255
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(255)]
|
||||
[StringLength(255)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Required, ConcurrenyToken
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
[ForeignKey("Permission_GroupPermissions_Id")]
|
||||
public virtual ICollection<Permission> GroupPermissions { get; protected set; }
|
||||
|
||||
[ForeignKey("ProviderMapping_ProviderMappings_Id")]
|
||||
public virtual ICollection<ProviderMapping> ProviderMappings { get; protected set; }
|
||||
|
||||
[ForeignKey("Preference_Preferences_Id")]
|
||||
public virtual ICollection<Preference> Preferences { get; protected set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,158 +1,147 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class Library
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Library()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Library CreateLibraryUnsafe()
|
||||
{
|
||||
return new Library();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
public Library(string name)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
|
||||
this.Name = name;
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
public static Library Create(string name)
|
||||
{
|
||||
return new Library(name);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class Library
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Library()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Library CreateLibraryUnsafe()
|
||||
{
|
||||
return new Library();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
public Library(string name)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
|
||||
this.Name = name;
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
public static Library Create(string name)
|
||||
{
|
||||
return new Library(name);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
_Id = value;
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Id = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Name
|
||||
/// </summary>
|
||||
protected string _Name;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetName(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetName(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Max length = 1024
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Name;
|
||||
GetName(ref value);
|
||||
return (_Name = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Name;
|
||||
SetName(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Name
|
||||
/// </summary>
|
||||
protected string _Name;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetName(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetName(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Max length = 1024
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
_Name = value;
|
||||
string value = _Name;
|
||||
GetName(ref value);
|
||||
return (_Name = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Name;
|
||||
SetName(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Name = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required, ConcurrenyToken
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public byte[] Timestamp { get; set; }
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,180 +1,170 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public abstract partial class LibraryItem
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to being abstract.
|
||||
/// </summary>
|
||||
protected LibraryItem()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
protected LibraryItem(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
this.UrlId = urlid;
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public abstract partial class LibraryItem
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to being abstract.
|
||||
/// </summary>
|
||||
protected LibraryItem()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
protected LibraryItem(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
this.UrlId = urlid;
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Id = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for UrlId
|
||||
/// </summary>
|
||||
internal Guid _UrlId;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of UrlId to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetUrlId(Guid oldValue, ref Guid newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of UrlId to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetUrlId(ref Guid result);
|
||||
|
||||
/// <summary>
|
||||
/// Indexed, Required
|
||||
/// This is whats gets displayed in the Urls and API requests. This could also be a string.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid UrlId
|
||||
{
|
||||
get
|
||||
{
|
||||
Guid value = _UrlId;
|
||||
GetUrlId(ref value);
|
||||
return (_UrlId = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
_Id = value;
|
||||
Guid oldValue = _UrlId;
|
||||
SetUrlId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_UrlId = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for UrlId
|
||||
/// </summary>
|
||||
internal Guid _UrlId;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of UrlId to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetUrlId(Guid oldValue, ref Guid newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of UrlId to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetUrlId(ref Guid result);
|
||||
|
||||
/// <summary>
|
||||
/// Indexed, Required
|
||||
/// This is whats gets displayed in the Urls and API requests. This could also be a string.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid UrlId
|
||||
{
|
||||
get
|
||||
{
|
||||
Guid value = _UrlId;
|
||||
GetUrlId(ref value);
|
||||
return (_UrlId = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
Guid oldValue = _UrlId;
|
||||
SetUrlId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for DateAdded
|
||||
/// </summary>
|
||||
protected DateTime _DateAdded;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of DateAdded to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetDateAdded(DateTime oldValue, ref DateTime newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of DateAdded to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetDateAdded(ref DateTime result);
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime DateAdded
|
||||
{
|
||||
get
|
||||
{
|
||||
_UrlId = value;
|
||||
DateTime value = _DateAdded;
|
||||
GetDateAdded(ref value);
|
||||
return (_DateAdded = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for DateAdded
|
||||
/// </summary>
|
||||
protected DateTime _DateAdded;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of DateAdded to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetDateAdded(DateTime oldValue, ref DateTime newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of DateAdded to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetDateAdded(ref DateTime result);
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime DateAdded
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime value = _DateAdded;
|
||||
GetDateAdded(ref value);
|
||||
return (_DateAdded = value);
|
||||
}
|
||||
internal set
|
||||
{
|
||||
DateTime oldValue = _DateAdded;
|
||||
SetDateAdded(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
internal set
|
||||
{
|
||||
_DateAdded = value;
|
||||
DateTime oldValue = _DateAdded;
|
||||
SetDateAdded(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_DateAdded = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public byte[] Timestamp { get; set; }
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
public virtual global::Jellyfin.Data.Entities.LibraryRoot LibraryRoot { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required, ConcurrenyToken
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ForeignKey("LibraryRoot_Id")]
|
||||
public virtual LibraryRoot LibraryRoot { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,202 +1,192 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class LibraryRoot
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected LibraryRoot()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static LibraryRoot CreateLibraryRootUnsafe()
|
||||
{
|
||||
return new LibraryRoot();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="path">Absolute Path</param>
|
||||
public LibraryRoot(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
|
||||
this.Path = path;
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="path">Absolute Path</param>
|
||||
public static LibraryRoot Create(string path)
|
||||
{
|
||||
return new LibraryRoot(path);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class LibraryRoot
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected LibraryRoot()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static LibraryRoot CreateLibraryRootUnsafe()
|
||||
{
|
||||
return new LibraryRoot();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="path">Absolute Path</param>
|
||||
public LibraryRoot(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
|
||||
this.Path = path;
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="path">Absolute Path</param>
|
||||
public static LibraryRoot Create(string path)
|
||||
{
|
||||
return new LibraryRoot(path);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Id = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Path
|
||||
/// </summary>
|
||||
protected string _Path;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Path to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetPath(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Path to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetPath(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Max length = 65535
|
||||
/// Absolute Path
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(65535)]
|
||||
[StringLength(65535)]
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Path;
|
||||
GetPath(ref value);
|
||||
return (_Path = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
_Id = value;
|
||||
string oldValue = _Path;
|
||||
SetPath(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Path = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Path
|
||||
/// </summary>
|
||||
protected string _Path;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Path to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetPath(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Path to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetPath(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Max length = 65535
|
||||
/// Absolute Path
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(65535)]
|
||||
[StringLength(65535)]
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Path;
|
||||
GetPath(ref value);
|
||||
return (_Path = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Path;
|
||||
SetPath(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for NetworkPath
|
||||
/// </summary>
|
||||
protected string _NetworkPath;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of NetworkPath to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetNetworkPath(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of NetworkPath to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetNetworkPath(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 65535
|
||||
/// Absolute network path, for example for transcoding sattelites.
|
||||
/// </summary>
|
||||
[MaxLength(65535)]
|
||||
[StringLength(65535)]
|
||||
public string NetworkPath
|
||||
{
|
||||
get
|
||||
{
|
||||
_Path = value;
|
||||
string value = _NetworkPath;
|
||||
GetNetworkPath(ref value);
|
||||
return (_NetworkPath = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for NetworkPath
|
||||
/// </summary>
|
||||
protected string _NetworkPath;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of NetworkPath to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetNetworkPath(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of NetworkPath to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetNetworkPath(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 65535
|
||||
/// Absolute network path, for example for transcoding sattelites.
|
||||
/// </summary>
|
||||
[MaxLength(65535)]
|
||||
[StringLength(65535)]
|
||||
public string NetworkPath
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _NetworkPath;
|
||||
GetNetworkPath(ref value);
|
||||
return (_NetworkPath = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _NetworkPath;
|
||||
SetNetworkPath(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
set
|
||||
{
|
||||
_NetworkPath = value;
|
||||
string oldValue = _NetworkPath;
|
||||
SetNetworkPath(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_NetworkPath = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public byte[] Timestamp { get; set; }
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
public virtual global::Jellyfin.Data.Entities.Library Library { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required, ConcurrenyToken
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ForeignKey("Library_Id")]
|
||||
public virtual Library Library { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,209 +1,200 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class MediaFile
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected MediaFile()
|
||||
{
|
||||
MediaFileStreams = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MediaFileStream>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static MediaFile CreateMediaFileUnsafe()
|
||||
{
|
||||
return new MediaFile();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="path">Relative to the LibraryRoot</param>
|
||||
/// <param name="kind"></param>
|
||||
/// <param name="_release0"></param>
|
||||
public MediaFile(string path, global::Jellyfin.Data.Enums.MediaFileKind kind, global::Jellyfin.Data.Entities.Release _release0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
|
||||
this.Path = path;
|
||||
|
||||
this.Kind = kind;
|
||||
|
||||
if (_release0 == null) throw new ArgumentNullException(nameof(_release0));
|
||||
_release0.MediaFiles.Add(this);
|
||||
|
||||
this.MediaFileStreams = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MediaFileStream>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="path">Relative to the LibraryRoot</param>
|
||||
/// <param name="kind"></param>
|
||||
/// <param name="_release0"></param>
|
||||
public static MediaFile Create(string path, global::Jellyfin.Data.Enums.MediaFileKind kind, global::Jellyfin.Data.Entities.Release _release0)
|
||||
{
|
||||
return new MediaFile(path, kind, _release0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class MediaFile
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected MediaFile()
|
||||
{
|
||||
MediaFileStreams = new HashSet<MediaFileStream>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static MediaFile CreateMediaFileUnsafe()
|
||||
{
|
||||
return new MediaFile();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="path">Relative to the LibraryRoot</param>
|
||||
/// <param name="kind"></param>
|
||||
/// <param name="_release0"></param>
|
||||
public MediaFile(string path, Enums.MediaFileKind kind, Release _release0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
|
||||
this.Path = path;
|
||||
|
||||
this.Kind = kind;
|
||||
|
||||
if (_release0 == null) throw new ArgumentNullException(nameof(_release0));
|
||||
_release0.MediaFiles.Add(this);
|
||||
|
||||
this.MediaFileStreams = new HashSet<MediaFileStream>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="path">Relative to the LibraryRoot</param>
|
||||
/// <param name="kind"></param>
|
||||
/// <param name="_release0"></param>
|
||||
public static MediaFile Create(string path, Enums.MediaFileKind kind, Release _release0)
|
||||
{
|
||||
return new MediaFile(path, kind, _release0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Id = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Path
|
||||
/// </summary>
|
||||
protected string _Path;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Path to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetPath(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Path to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetPath(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Max length = 65535
|
||||
/// Relative to the LibraryRoot
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(65535)]
|
||||
[StringLength(65535)]
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Path;
|
||||
GetPath(ref value);
|
||||
return (_Path = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
_Id = value;
|
||||
string oldValue = _Path;
|
||||
SetPath(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Path = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Path
|
||||
/// </summary>
|
||||
protected string _Path;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Path to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetPath(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Path to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetPath(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Max length = 65535
|
||||
/// Relative to the LibraryRoot
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(65535)]
|
||||
[StringLength(65535)]
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Path;
|
||||
GetPath(ref value);
|
||||
return (_Path = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Path;
|
||||
SetPath(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Kind
|
||||
/// </summary>
|
||||
protected Enums.MediaFileKind _Kind;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Kind to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetKind(Enums.MediaFileKind oldValue, ref Enums.MediaFileKind newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Kind to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetKind(ref Enums.MediaFileKind result);
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Enums.MediaFileKind Kind
|
||||
{
|
||||
get
|
||||
{
|
||||
_Path = value;
|
||||
Enums.MediaFileKind value = _Kind;
|
||||
GetKind(ref value);
|
||||
return (_Kind = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Kind
|
||||
/// </summary>
|
||||
protected global::Jellyfin.Data.Enums.MediaFileKind _Kind;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Kind to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetKind(global::Jellyfin.Data.Enums.MediaFileKind oldValue, ref global::Jellyfin.Data.Enums.MediaFileKind newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Kind to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetKind(ref global::Jellyfin.Data.Enums.MediaFileKind result);
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public global::Jellyfin.Data.Enums.MediaFileKind Kind
|
||||
{
|
||||
get
|
||||
{
|
||||
global::Jellyfin.Data.Enums.MediaFileKind value = _Kind;
|
||||
GetKind(ref value);
|
||||
return (_Kind = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
global::Jellyfin.Data.Enums.MediaFileKind oldValue = _Kind;
|
||||
SetKind(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
set
|
||||
{
|
||||
_Kind = value;
|
||||
Enums.MediaFileKind oldValue = _Kind;
|
||||
SetKind(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Kind = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required, ConcurrenyToken
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public byte[] Timestamp { get; set; }
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.MediaFileStream> MediaFileStreams { get; protected set; }
|
||||
[ForeignKey("MediaFileStream_MediaFileStreams_Id")]
|
||||
public virtual ICollection<MediaFileStream> MediaFileStreams { get; protected set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,160 +1,149 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class MediaFileStream
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected MediaFileStream()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static MediaFileStream CreateMediaFileStreamUnsafe()
|
||||
{
|
||||
return new MediaFileStream();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="streamnumber"></param>
|
||||
/// <param name="_mediafile0"></param>
|
||||
public MediaFileStream(int streamnumber, global::Jellyfin.Data.Entities.MediaFile _mediafile0)
|
||||
{
|
||||
this.StreamNumber = streamnumber;
|
||||
|
||||
if (_mediafile0 == null) throw new ArgumentNullException(nameof(_mediafile0));
|
||||
_mediafile0.MediaFileStreams.Add(this);
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="streamnumber"></param>
|
||||
/// <param name="_mediafile0"></param>
|
||||
public static MediaFileStream Create(int streamnumber, global::Jellyfin.Data.Entities.MediaFile _mediafile0)
|
||||
{
|
||||
return new MediaFileStream(streamnumber, _mediafile0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class MediaFileStream
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected MediaFileStream()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static MediaFileStream CreateMediaFileStreamUnsafe()
|
||||
{
|
||||
return new MediaFileStream();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="streamnumber"></param>
|
||||
/// <param name="_mediafile0"></param>
|
||||
public MediaFileStream(int streamnumber, MediaFile _mediafile0)
|
||||
{
|
||||
this.StreamNumber = streamnumber;
|
||||
|
||||
if (_mediafile0 == null) throw new ArgumentNullException(nameof(_mediafile0));
|
||||
_mediafile0.MediaFileStreams.Add(this);
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="streamnumber"></param>
|
||||
/// <param name="_mediafile0"></param>
|
||||
public static MediaFileStream Create(int streamnumber, MediaFile _mediafile0)
|
||||
{
|
||||
return new MediaFileStream(streamnumber, _mediafile0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
_Id = value;
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Id = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for StreamNumber
|
||||
/// </summary>
|
||||
protected int _StreamNumber;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of StreamNumber to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetStreamNumber(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of StreamNumber to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetStreamNumber(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int StreamNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _StreamNumber;
|
||||
GetStreamNumber(ref value);
|
||||
return (_StreamNumber = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
int oldValue = _StreamNumber;
|
||||
SetStreamNumber(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for StreamNumber
|
||||
/// </summary>
|
||||
protected int _StreamNumber;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of StreamNumber to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetStreamNumber(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of StreamNumber to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetStreamNumber(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int StreamNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
_StreamNumber = value;
|
||||
int value = _StreamNumber;
|
||||
GetStreamNumber(ref value);
|
||||
return (_StreamNumber = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
int oldValue = _StreamNumber;
|
||||
SetStreamNumber(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_StreamNumber = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required, ConcurrenyToken
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public byte[] Timestamp { get; set; }
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,385 +1,380 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public abstract partial class Metadata
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to being abstract.
|
||||
/// </summary>
|
||||
protected Metadata()
|
||||
{
|
||||
PersonRoles = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.PersonRole>();
|
||||
Genres = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Genre>();
|
||||
Artwork = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Artwork>();
|
||||
Ratings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Rating>();
|
||||
Sources = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MetadataProviderId>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
protected Metadata(string title, string language, DateTime dateadded, DateTime datemodified)
|
||||
{
|
||||
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
|
||||
this.Title = title;
|
||||
|
||||
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
|
||||
this.Language = language;
|
||||
|
||||
this.PersonRoles = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.PersonRole>();
|
||||
this.Genres = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Genre>();
|
||||
this.Artwork = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Artwork>();
|
||||
this.Ratings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Rating>();
|
||||
this.Sources = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MetadataProviderId>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public abstract partial class Metadata
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to being abstract.
|
||||
/// </summary>
|
||||
protected Metadata()
|
||||
{
|
||||
PersonRoles = new HashSet<PersonRole>();
|
||||
Genres = new HashSet<Genre>();
|
||||
Artwork = new HashSet<Artwork>();
|
||||
Ratings = new HashSet<Rating>();
|
||||
Sources = new HashSet<MetadataProviderId>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
protected Metadata(string title, string language, DateTime dateadded, DateTime datemodified)
|
||||
{
|
||||
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
|
||||
this.Title = title;
|
||||
|
||||
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
|
||||
this.Language = language;
|
||||
|
||||
this.PersonRoles = new HashSet<PersonRole>();
|
||||
this.Genres = new HashSet<Genre>();
|
||||
this.Artwork = new HashSet<Artwork>();
|
||||
this.Ratings = new HashSet<Rating>();
|
||||
this.Sources = new HashSet<MetadataProviderId>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Id = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Title
|
||||
/// </summary>
|
||||
protected string _Title;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Title to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetTitle(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Title to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetTitle(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Max length = 1024
|
||||
/// The title or name of the object
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Title
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Title;
|
||||
GetTitle(ref value);
|
||||
return (_Title = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Title;
|
||||
SetTitle(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Title = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for OriginalTitle
|
||||
/// </summary>
|
||||
protected string _OriginalTitle;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of OriginalTitle to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetOriginalTitle(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of OriginalTitle to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetOriginalTitle(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string OriginalTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
_Id = value;
|
||||
string value = _OriginalTitle;
|
||||
GetOriginalTitle(ref value);
|
||||
return (_OriginalTitle = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Title
|
||||
/// </summary>
|
||||
protected string _Title;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Title to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetTitle(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Title to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetTitle(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Max length = 1024
|
||||
/// The title or name of the object
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Title
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Title;
|
||||
GetTitle(ref value);
|
||||
return (_Title = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Title;
|
||||
SetTitle(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
set
|
||||
{
|
||||
_Title = value;
|
||||
string oldValue = _OriginalTitle;
|
||||
SetOriginalTitle(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_OriginalTitle = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for OriginalTitle
|
||||
/// </summary>
|
||||
protected string _OriginalTitle;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of OriginalTitle to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetOriginalTitle(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of OriginalTitle to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetOriginalTitle(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string OriginalTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _OriginalTitle;
|
||||
GetOriginalTitle(ref value);
|
||||
return (_OriginalTitle = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _OriginalTitle;
|
||||
SetOriginalTitle(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for SortTitle
|
||||
/// </summary>
|
||||
protected string _SortTitle;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of SortTitle to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetSortTitle(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of SortTitle to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetSortTitle(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string SortTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
_OriginalTitle = value;
|
||||
string value = _SortTitle;
|
||||
GetSortTitle(ref value);
|
||||
return (_SortTitle = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for SortTitle
|
||||
/// </summary>
|
||||
protected string _SortTitle;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of SortTitle to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetSortTitle(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of SortTitle to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetSortTitle(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string SortTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _SortTitle;
|
||||
GetSortTitle(ref value);
|
||||
return (_SortTitle = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _SortTitle;
|
||||
SetSortTitle(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
set
|
||||
{
|
||||
_SortTitle = value;
|
||||
string oldValue = _SortTitle;
|
||||
SetSortTitle(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_SortTitle = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Language
|
||||
/// </summary>
|
||||
protected string _Language;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Language to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetLanguage(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Language to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetLanguage(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Min length = 3, Max length = 3
|
||||
/// ISO-639-3 3-character language codes
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MinLength(3)]
|
||||
[MaxLength(3)]
|
||||
[StringLength(3)]
|
||||
public string Language
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Language;
|
||||
GetLanguage(ref value);
|
||||
return (_Language = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Language;
|
||||
SetLanguage(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Language
|
||||
/// </summary>
|
||||
protected string _Language;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Language to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetLanguage(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Language to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetLanguage(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Min length = 3, Max length = 3
|
||||
/// ISO-639-3 3-character language codes
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MinLength(3)]
|
||||
[MaxLength(3)]
|
||||
[StringLength(3)]
|
||||
public string Language
|
||||
{
|
||||
get
|
||||
{
|
||||
_Language = value;
|
||||
string value = _Language;
|
||||
GetLanguage(ref value);
|
||||
return (_Language = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for ReleaseDate
|
||||
/// </summary>
|
||||
protected DateTimeOffset? _ReleaseDate;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of ReleaseDate to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetReleaseDate(DateTimeOffset? oldValue, ref DateTimeOffset? newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of ReleaseDate to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetReleaseDate(ref DateTimeOffset? result);
|
||||
|
||||
public DateTimeOffset? ReleaseDate
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTimeOffset? value = _ReleaseDate;
|
||||
GetReleaseDate(ref value);
|
||||
return (_ReleaseDate = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
DateTimeOffset? oldValue = _ReleaseDate;
|
||||
SetReleaseDate(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
set
|
||||
{
|
||||
_ReleaseDate = value;
|
||||
string oldValue = _Language;
|
||||
SetLanguage(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Language = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for DateAdded
|
||||
/// </summary>
|
||||
protected DateTime _DateAdded;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of DateAdded to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetDateAdded(DateTime oldValue, ref DateTime newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of DateAdded to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetDateAdded(ref DateTime result);
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime DateAdded
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime value = _DateAdded;
|
||||
GetDateAdded(ref value);
|
||||
return (_DateAdded = value);
|
||||
}
|
||||
internal set
|
||||
{
|
||||
DateTime oldValue = _DateAdded;
|
||||
SetDateAdded(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for ReleaseDate
|
||||
/// </summary>
|
||||
protected DateTimeOffset? _ReleaseDate;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of ReleaseDate to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetReleaseDate(DateTimeOffset? oldValue, ref DateTimeOffset? newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of ReleaseDate to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetReleaseDate(ref DateTimeOffset? result);
|
||||
|
||||
public DateTimeOffset? ReleaseDate
|
||||
{
|
||||
get
|
||||
{
|
||||
_DateAdded = value;
|
||||
DateTimeOffset? value = _ReleaseDate;
|
||||
GetReleaseDate(ref value);
|
||||
return (_ReleaseDate = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for DateModified
|
||||
/// </summary>
|
||||
protected DateTime _DateModified;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of DateModified to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetDateModified(DateTime oldValue, ref DateTime newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of DateModified to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetDateModified(ref DateTime result);
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime DateModified
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime value = _DateModified;
|
||||
GetDateModified(ref value);
|
||||
return (_DateModified = value);
|
||||
}
|
||||
internal set
|
||||
{
|
||||
DateTime oldValue = _DateModified;
|
||||
SetDateModified(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
set
|
||||
{
|
||||
_DateModified = value;
|
||||
DateTimeOffset? oldValue = _ReleaseDate;
|
||||
SetReleaseDate(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_ReleaseDate = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for DateAdded
|
||||
/// </summary>
|
||||
protected DateTime _DateAdded;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of DateAdded to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetDateAdded(DateTime oldValue, ref DateTime newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of DateAdded to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetDateAdded(ref DateTime result);
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime DateAdded
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime value = _DateAdded;
|
||||
GetDateAdded(ref value);
|
||||
return (_DateAdded = value);
|
||||
}
|
||||
internal set
|
||||
{
|
||||
DateTime oldValue = _DateAdded;
|
||||
SetDateAdded(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_DateAdded = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for DateModified
|
||||
/// </summary>
|
||||
protected DateTime _DateModified;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of DateModified to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetDateModified(DateTime oldValue, ref DateTime newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of DateModified to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetDateModified(ref DateTime result);
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public DateTime DateModified
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime value = _DateModified;
|
||||
GetDateModified(ref value);
|
||||
return (_DateModified = value);
|
||||
}
|
||||
internal set
|
||||
{
|
||||
DateTime oldValue = _DateModified;
|
||||
SetDateModified(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_DateModified = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required, ConcurrenyToken
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public byte[] Timestamp { get; set; }
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.PersonRole> PersonRoles { get; protected set; }
|
||||
[ForeignKey("PersonRole_PersonRoles_Id")]
|
||||
public virtual ICollection<PersonRole> PersonRoles { get; protected set; }
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.Genre> Genres { get; protected set; }
|
||||
[ForeignKey("PersonRole_PersonRoles_Id")]
|
||||
public virtual ICollection<Genre> Genres { get; protected set; }
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.Artwork> Artwork { get; protected set; }
|
||||
[ForeignKey("PersonRole_PersonRoles_Id")]
|
||||
public virtual ICollection<Artwork> Artwork { get; protected set; }
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.Rating> Ratings { get; protected set; }
|
||||
[ForeignKey("PersonRole_PersonRoles_Id")]
|
||||
public virtual ICollection<Rating> Ratings { get; protected set; }
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.MetadataProviderId> Sources { get; protected set; }
|
||||
[ForeignKey("PersonRole_PersonRoles_Id")]
|
||||
public virtual ICollection<MetadataProviderId> Sources { get; protected set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,158 +1,147 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class MetadataProvider
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected MetadataProvider()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static MetadataProvider CreateMetadataProviderUnsafe()
|
||||
{
|
||||
return new MetadataProvider();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
public MetadataProvider(string name)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
|
||||
this.Name = name;
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
public static MetadataProvider Create(string name)
|
||||
{
|
||||
return new MetadataProvider(name);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class MetadataProvider
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected MetadataProvider()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static MetadataProvider CreateMetadataProviderUnsafe()
|
||||
{
|
||||
return new MetadataProvider();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
public MetadataProvider(string name)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
|
||||
this.Name = name;
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
public static MetadataProvider Create(string name)
|
||||
{
|
||||
return new MetadataProvider(name);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
_Id = value;
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Id = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Name
|
||||
/// </summary>
|
||||
protected string _Name;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetName(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetName(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Max length = 1024
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Name;
|
||||
GetName(ref value);
|
||||
return (_Name = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Name;
|
||||
SetName(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Name
|
||||
/// </summary>
|
||||
protected string _Name;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetName(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Name to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetName(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Max length = 1024
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
_Name = value;
|
||||
string value = _Name;
|
||||
GetName(ref value);
|
||||
return (_Name = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Name;
|
||||
SetName(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Name = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required, ConcurrenyToken
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public byte[] Timestamp { get; set; }
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,189 +1,179 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class MetadataProviderId
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected MetadataProviderId()
|
||||
{
|
||||
// NOTE: This class has one-to-one associations with MetadataProviderId.
|
||||
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static MetadataProviderId CreateMetadataProviderIdUnsafe()
|
||||
{
|
||||
return new MetadataProviderId();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="providerid"></param>
|
||||
/// <param name="_metadata0"></param>
|
||||
/// <param name="_person1"></param>
|
||||
/// <param name="_personrole2"></param>
|
||||
/// <param name="_ratingsource3"></param>
|
||||
public MetadataProviderId(string providerid, global::Jellyfin.Data.Entities.Metadata _metadata0, global::Jellyfin.Data.Entities.Person _person1, global::Jellyfin.Data.Entities.PersonRole _personrole2, global::Jellyfin.Data.Entities.RatingSource _ratingsource3)
|
||||
{
|
||||
// NOTE: This class has one-to-one associations with MetadataProviderId.
|
||||
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
|
||||
|
||||
if (string.IsNullOrEmpty(providerid)) throw new ArgumentNullException(nameof(providerid));
|
||||
this.ProviderId = providerid;
|
||||
|
||||
if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
|
||||
_metadata0.Sources.Add(this);
|
||||
|
||||
if (_person1 == null) throw new ArgumentNullException(nameof(_person1));
|
||||
_person1.Sources.Add(this);
|
||||
|
||||
if (_personrole2 == null) throw new ArgumentNullException(nameof(_personrole2));
|
||||
_personrole2.Sources.Add(this);
|
||||
|
||||
if (_ratingsource3 == null) throw new ArgumentNullException(nameof(_ratingsource3));
|
||||
_ratingsource3.Source = this;
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="providerid"></param>
|
||||
/// <param name="_metadata0"></param>
|
||||
/// <param name="_person1"></param>
|
||||
/// <param name="_personrole2"></param>
|
||||
/// <param name="_ratingsource3"></param>
|
||||
public static MetadataProviderId Create(string providerid, global::Jellyfin.Data.Entities.Metadata _metadata0, global::Jellyfin.Data.Entities.Person _person1, global::Jellyfin.Data.Entities.PersonRole _personrole2, global::Jellyfin.Data.Entities.RatingSource _ratingsource3)
|
||||
{
|
||||
return new MetadataProviderId(providerid, _metadata0, _person1, _personrole2, _ratingsource3);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class MetadataProviderId
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected MetadataProviderId()
|
||||
{
|
||||
// NOTE: This class has one-to-one associations with MetadataProviderId.
|
||||
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static MetadataProviderId CreateMetadataProviderIdUnsafe()
|
||||
{
|
||||
return new MetadataProviderId();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="providerid"></param>
|
||||
/// <param name="_metadata0"></param>
|
||||
/// <param name="_person1"></param>
|
||||
/// <param name="_personrole2"></param>
|
||||
/// <param name="_ratingsource3"></param>
|
||||
public MetadataProviderId(string providerid, Metadata _metadata0, Person _person1, PersonRole _personrole2, RatingSource _ratingsource3)
|
||||
{
|
||||
// NOTE: This class has one-to-one associations with MetadataProviderId.
|
||||
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
|
||||
|
||||
if (string.IsNullOrEmpty(providerid)) throw new ArgumentNullException(nameof(providerid));
|
||||
this.ProviderId = providerid;
|
||||
|
||||
if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
|
||||
_metadata0.Sources.Add(this);
|
||||
|
||||
if (_person1 == null) throw new ArgumentNullException(nameof(_person1));
|
||||
_person1.Sources.Add(this);
|
||||
|
||||
if (_personrole2 == null) throw new ArgumentNullException(nameof(_personrole2));
|
||||
_personrole2.Sources.Add(this);
|
||||
|
||||
if (_ratingsource3 == null) throw new ArgumentNullException(nameof(_ratingsource3));
|
||||
_ratingsource3.Source = this;
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="providerid"></param>
|
||||
/// <param name="_metadata0"></param>
|
||||
/// <param name="_person1"></param>
|
||||
/// <param name="_personrole2"></param>
|
||||
/// <param name="_ratingsource3"></param>
|
||||
public static MetadataProviderId Create(string providerid, Metadata _metadata0, Person _person1, PersonRole _personrole2, RatingSource _ratingsource3)
|
||||
{
|
||||
return new MetadataProviderId(providerid, _metadata0, _person1, _personrole2, _ratingsource3);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Id
|
||||
/// </summary>
|
||||
internal int _Id;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetId(int oldValue, ref int newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Id to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetId(ref int result);
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
int value = _Id;
|
||||
GetId(ref value);
|
||||
return (_Id = value);
|
||||
}
|
||||
protected set
|
||||
{
|
||||
int oldValue = _Id;
|
||||
SetId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Id = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for ProviderId
|
||||
/// </summary>
|
||||
protected string _ProviderId;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of ProviderId to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetProviderId(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of ProviderId to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetProviderId(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Max length = 255
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(255)]
|
||||
[StringLength(255)]
|
||||
public string ProviderId
|
||||
{
|
||||
get
|
||||
{
|
||||
_Id = value;
|
||||
string value = _ProviderId;
|
||||
GetProviderId(ref value);
|
||||
return (_ProviderId = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for ProviderId
|
||||
/// </summary>
|
||||
protected string _ProviderId;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of ProviderId to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetProviderId(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of ProviderId to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetProviderId(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Required, Max length = 255
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(255)]
|
||||
[StringLength(255)]
|
||||
public string ProviderId
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _ProviderId;
|
||||
GetProviderId(ref value);
|
||||
return (_ProviderId = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _ProviderId;
|
||||
SetProviderId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
set
|
||||
{
|
||||
_ProviderId = value;
|
||||
string oldValue = _ProviderId;
|
||||
SetProviderId(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_ProviderId = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public byte[] Timestamp { get; set; }
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
public virtual global::Jellyfin.Data.Entities.MetadataProvider MetadataProvider { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required, ConcurrenyToken
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[ForeignKey("MetadataProvider_Id")]
|
||||
public virtual MetadataProvider MetadataProvider { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,84 +1,69 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class Movie: global::Jellyfin.Data.Entities.LibraryItem
|
||||
{
|
||||
partial void Init();
|
||||
public partial class Movie : LibraryItem
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Movie(): base()
|
||||
{
|
||||
Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
|
||||
MovieMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MovieMetadata>();
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Movie()
|
||||
{
|
||||
Releases = new HashSet<Release>();
|
||||
MovieMetadata = new HashSet<MovieMetadata>();
|
||||
|
||||
Init();
|
||||
}
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Movie CreateMovieUnsafe()
|
||||
{
|
||||
return new Movie();
|
||||
}
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Movie CreateMovieUnsafe()
|
||||
{
|
||||
return new Movie();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
public Movie(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
this.UrlId = urlid;
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
public Movie(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
this.UrlId = urlid;
|
||||
|
||||
this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
|
||||
this.MovieMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MovieMetadata>();
|
||||
this.Releases = new HashSet<Release>();
|
||||
this.MovieMetadata = new HashSet<MovieMetadata>();
|
||||
|
||||
Init();
|
||||
}
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
public static Movie Create(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
return new Movie(urlid, dateadded);
|
||||
}
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
public static Movie Create(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
return new Movie(urlid, dateadded);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.Release> Releases { get; protected set; }
|
||||
[ForeignKey("Release_Releases_Id")]
|
||||
public virtual ICollection<Release> Releases { get; protected set; }
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.MovieMetadata> MovieMetadata { get; protected set; }
|
||||
[ForeignKey("MovieMetadata_MovieMetadata_Id")]
|
||||
public virtual ICollection<MovieMetadata> MovieMetadata { get; protected set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,239 +1,223 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class MovieMetadata: global::Jellyfin.Data.Entities.Metadata
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected MovieMetadata(): base()
|
||||
{
|
||||
Studios = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static MovieMetadata CreateMovieMetadataUnsafe()
|
||||
{
|
||||
return new MovieMetadata();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_movie0"></param>
|
||||
public MovieMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Movie _movie0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
|
||||
this.Title = title;
|
||||
|
||||
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
|
||||
this.Language = language;
|
||||
|
||||
if (_movie0 == null) throw new ArgumentNullException(nameof(_movie0));
|
||||
_movie0.MovieMetadata.Add(this);
|
||||
|
||||
this.Studios = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_movie0"></param>
|
||||
public static MovieMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Movie _movie0)
|
||||
{
|
||||
return new MovieMetadata(title, language, dateadded, datemodified, _movie0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Outline
|
||||
/// </summary>
|
||||
protected string _Outline;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Outline to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetOutline(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Outline to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetOutline(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Outline
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Outline;
|
||||
GetOutline(ref value);
|
||||
return (_Outline = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Outline;
|
||||
SetOutline(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class MovieMetadata : Metadata
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected MovieMetadata()
|
||||
{
|
||||
Studios = new HashSet<Company>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static MovieMetadata CreateMovieMetadataUnsafe()
|
||||
{
|
||||
return new MovieMetadata();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_movie0"></param>
|
||||
public MovieMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Movie _movie0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
|
||||
this.Title = title;
|
||||
|
||||
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
|
||||
this.Language = language;
|
||||
|
||||
if (_movie0 == null) throw new ArgumentNullException(nameof(_movie0));
|
||||
_movie0.MovieMetadata.Add(this);
|
||||
|
||||
this.Studios = new HashSet<Company>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_movie0"></param>
|
||||
public static MovieMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Movie _movie0)
|
||||
{
|
||||
return new MovieMetadata(title, language, dateadded, datemodified, _movie0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Outline
|
||||
/// </summary>
|
||||
protected string _Outline;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Outline to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetOutline(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Outline to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetOutline(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Outline
|
||||
{
|
||||
get
|
||||
{
|
||||
_Outline = value;
|
||||
string value = _Outline;
|
||||
GetOutline(ref value);
|
||||
return (_Outline = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Plot
|
||||
/// </summary>
|
||||
protected string _Plot;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Plot to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetPlot(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Plot to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetPlot(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 65535
|
||||
/// </summary>
|
||||
[MaxLength(65535)]
|
||||
[StringLength(65535)]
|
||||
public string Plot
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Plot;
|
||||
GetPlot(ref value);
|
||||
return (_Plot = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Plot;
|
||||
SetPlot(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
set
|
||||
{
|
||||
_Plot = value;
|
||||
string oldValue = _Outline;
|
||||
SetOutline(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Outline = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Tagline
|
||||
/// </summary>
|
||||
protected string _Tagline;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Tagline to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetTagline(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Tagline to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetTagline(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Tagline
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Tagline;
|
||||
GetTagline(ref value);
|
||||
return (_Tagline = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Tagline;
|
||||
SetTagline(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Plot
|
||||
/// </summary>
|
||||
protected string _Plot;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Plot to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetPlot(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Plot to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetPlot(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 65535
|
||||
/// </summary>
|
||||
[MaxLength(65535)]
|
||||
[StringLength(65535)]
|
||||
public string Plot
|
||||
{
|
||||
get
|
||||
{
|
||||
_Tagline = value;
|
||||
string value = _Plot;
|
||||
GetPlot(ref value);
|
||||
return (_Plot = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Country
|
||||
/// </summary>
|
||||
protected string _Country;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Country to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetCountry(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Country to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetCountry(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 2
|
||||
/// </summary>
|
||||
[MaxLength(2)]
|
||||
[StringLength(2)]
|
||||
public string Country
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Country;
|
||||
GetCountry(ref value);
|
||||
return (_Country = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Country;
|
||||
SetCountry(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
set
|
||||
{
|
||||
_Country = value;
|
||||
string oldValue = _Plot;
|
||||
SetPlot(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Plot = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Tagline
|
||||
/// </summary>
|
||||
protected string _Tagline;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Tagline to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetTagline(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Tagline to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetTagline(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 1024
|
||||
/// </summary>
|
||||
[MaxLength(1024)]
|
||||
[StringLength(1024)]
|
||||
public string Tagline
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Tagline;
|
||||
GetTagline(ref value);
|
||||
return (_Tagline = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Tagline;
|
||||
SetTagline(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Tagline = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Country
|
||||
/// </summary>
|
||||
protected string _Country;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Country to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetCountry(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Country to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetCountry(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 2
|
||||
/// </summary>
|
||||
[MaxLength(2)]
|
||||
[StringLength(2)]
|
||||
public string Country
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Country;
|
||||
GetCountry(ref value);
|
||||
return (_Country = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Country;
|
||||
SetCountry(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Country = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.Company> Studios { get; protected set; }
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
[ForeignKey("Company_Studios_Id")]
|
||||
public virtual ICollection<Company> Studios { get; protected set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,84 +1,68 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class MusicAlbum: global::Jellyfin.Data.Entities.LibraryItem
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected MusicAlbum(): base()
|
||||
{
|
||||
MusicAlbumMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MusicAlbumMetadata>();
|
||||
Tracks = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Track>();
|
||||
public partial class MusicAlbum : LibraryItem
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
Init();
|
||||
}
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected MusicAlbum()
|
||||
{
|
||||
MusicAlbumMetadata = new HashSet<MusicAlbumMetadata>();
|
||||
Tracks = new HashSet<Track>();
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static MusicAlbum CreateMusicAlbumUnsafe()
|
||||
{
|
||||
return new MusicAlbum();
|
||||
}
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
public MusicAlbum(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
this.UrlId = urlid;
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static MusicAlbum CreateMusicAlbumUnsafe()
|
||||
{
|
||||
return new MusicAlbum();
|
||||
}
|
||||
|
||||
this.MusicAlbumMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MusicAlbumMetadata>();
|
||||
this.Tracks = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Track>();
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
public MusicAlbum(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
this.UrlId = urlid;
|
||||
|
||||
Init();
|
||||
}
|
||||
this.MusicAlbumMetadata = new HashSet<MusicAlbumMetadata>();
|
||||
this.Tracks = new HashSet<Track>();
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
public static MusicAlbum Create(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
return new MusicAlbum(urlid, dateadded);
|
||||
}
|
||||
Init();
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
|
||||
public static MusicAlbum Create(Guid urlid, DateTime dateadded)
|
||||
{
|
||||
return new MusicAlbum(urlid, dateadded);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.MusicAlbumMetadata> MusicAlbumMetadata { get; protected set; }
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
[ForeignKey("MusicAlbumMetadata_MusicAlbumMetadata_Id")]
|
||||
public virtual ICollection<MusicAlbumMetadata> MusicAlbumMetadata { get; protected set; }
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.Track> Tracks { get; protected set; }
|
||||
[ForeignKey("Track_Tracks_Id")]
|
||||
public virtual ICollection<Track> Tracks { get; protected set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,202 +1,187 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class MusicAlbumMetadata: global::Jellyfin.Data.Entities.Metadata
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected MusicAlbumMetadata(): base()
|
||||
{
|
||||
Labels = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static MusicAlbumMetadata CreateMusicAlbumMetadataUnsafe()
|
||||
{
|
||||
return new MusicAlbumMetadata();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_musicalbum0"></param>
|
||||
public MusicAlbumMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.MusicAlbum _musicalbum0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
|
||||
this.Title = title;
|
||||
|
||||
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
|
||||
this.Language = language;
|
||||
|
||||
if (_musicalbum0 == null) throw new ArgumentNullException(nameof(_musicalbum0));
|
||||
_musicalbum0.MusicAlbumMetadata.Add(this);
|
||||
|
||||
this.Labels = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_musicalbum0"></param>
|
||||
public static MusicAlbumMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.MusicAlbum _musicalbum0)
|
||||
{
|
||||
return new MusicAlbumMetadata(title, language, dateadded, datemodified, _musicalbum0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Barcode
|
||||
/// </summary>
|
||||
protected string _Barcode;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Barcode to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetBarcode(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Barcode to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetBarcode(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 255
|
||||
/// </summary>
|
||||
[MaxLength(255)]
|
||||
[StringLength(255)]
|
||||
public string Barcode
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Barcode;
|
||||
GetBarcode(ref value);
|
||||
return (_Barcode = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Barcode;
|
||||
SetBarcode(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class MusicAlbumMetadata : Metadata
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected MusicAlbumMetadata()
|
||||
{
|
||||
Labels = new HashSet<Company>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static MusicAlbumMetadata CreateMusicAlbumMetadataUnsafe()
|
||||
{
|
||||
return new MusicAlbumMetadata();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_musicalbum0"></param>
|
||||
public MusicAlbumMetadata(string title, string language, DateTime dateadded, DateTime datemodified, MusicAlbum _musicalbum0)
|
||||
{
|
||||
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
|
||||
this.Title = title;
|
||||
|
||||
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
|
||||
this.Language = language;
|
||||
|
||||
if (_musicalbum0 == null) throw new ArgumentNullException(nameof(_musicalbum0));
|
||||
_musicalbum0.MusicAlbumMetadata.Add(this);
|
||||
|
||||
this.Labels = new HashSet<Company>();
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="title">The title or name of the object</param>
|
||||
/// <param name="language">ISO-639-3 3-character language codes</param>
|
||||
/// <param name="_musicalbum0"></param>
|
||||
public static MusicAlbumMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, MusicAlbum _musicalbum0)
|
||||
{
|
||||
return new MusicAlbumMetadata(title, language, dateadded, datemodified, _musicalbum0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Barcode
|
||||
/// </summary>
|
||||
protected string _Barcode;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Barcode to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetBarcode(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Barcode to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetBarcode(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 255
|
||||
/// </summary>
|
||||
[MaxLength(255)]
|
||||
[StringLength(255)]
|
||||
public string Barcode
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Barcode;
|
||||
GetBarcode(ref value);
|
||||
return (_Barcode = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Barcode;
|
||||
SetBarcode(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Barcode = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for LabelNumber
|
||||
/// </summary>
|
||||
protected string _LabelNumber;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of LabelNumber to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetLabelNumber(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of LabelNumber to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetLabelNumber(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 255
|
||||
/// </summary>
|
||||
[MaxLength(255)]
|
||||
[StringLength(255)]
|
||||
public string LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _LabelNumber;
|
||||
GetLabelNumber(ref value);
|
||||
return (_LabelNumber = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
_Barcode = value;
|
||||
string oldValue = _LabelNumber;
|
||||
SetLabelNumber(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_LabelNumber = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for LabelNumber
|
||||
/// </summary>
|
||||
protected string _LabelNumber;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of LabelNumber to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetLabelNumber(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of LabelNumber to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetLabelNumber(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 255
|
||||
/// </summary>
|
||||
[MaxLength(255)]
|
||||
[StringLength(255)]
|
||||
public string LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _LabelNumber;
|
||||
GetLabelNumber(ref value);
|
||||
return (_LabelNumber = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _LabelNumber;
|
||||
SetLabelNumber(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Country
|
||||
/// </summary>
|
||||
protected string _Country;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Country to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetCountry(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Country to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetCountry(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 2
|
||||
/// </summary>
|
||||
[MaxLength(2)]
|
||||
[StringLength(2)]
|
||||
public string Country
|
||||
{
|
||||
get
|
||||
{
|
||||
_LabelNumber = value;
|
||||
string value = _Country;
|
||||
GetCountry(ref value);
|
||||
return (_Country = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Country
|
||||
/// </summary>
|
||||
protected string _Country;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Country to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetCountry(string oldValue, ref string newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Country to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetCountry(ref string result);
|
||||
|
||||
/// <summary>
|
||||
/// Max length = 2
|
||||
/// </summary>
|
||||
[MaxLength(2)]
|
||||
[StringLength(2)]
|
||||
public string Country
|
||||
{
|
||||
get
|
||||
{
|
||||
string value = _Country;
|
||||
GetCountry(ref value);
|
||||
return (_Country = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
string oldValue = _Country;
|
||||
SetCountry(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
set
|
||||
{
|
||||
_Country = value;
|
||||
string oldValue = _Country;
|
||||
SetCountry(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Country = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.Company> Labels { get; protected set; }
|
||||
[ForeignKey("Company_Labels_Id")]
|
||||
public virtual ICollection<Company> Labels { get; protected set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,152 +1,144 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated from a template.
|
||||
//
|
||||
// Manual changes to this file may cause unexpected behavior in your application.
|
||||
// Manual changes to this file will be overwritten if the code is regenerated.
|
||||
//
|
||||
// Produced by Entity Framework Visual Editor
|
||||
// https://github.com/msawczyn/EFDesigner
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class Permission
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Permission()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Permission CreatePermissionUnsafe()
|
||||
{
|
||||
return new Permission();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="kind"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="_user0"></param>
|
||||
/// <param name="_group1"></param>
|
||||
public Permission(global::Jellyfin.Data.Enums.PermissionKind kind, bool value, global::Jellyfin.Data.Entities.User _user0, global::Jellyfin.Data.Entities.Group _group1)
|
||||
{
|
||||
this.Kind = kind;
|
||||
|
||||
this.Value = value;
|
||||
|
||||
if (_user0 == null) throw new ArgumentNullException(nameof(_user0));
|
||||
_user0.Permissions.Add(this);
|
||||
|
||||
if (_group1 == null) throw new ArgumentNullException(nameof(_group1));
|
||||
_group1.GroupPermissions.Add(this);
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="kind"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="_user0"></param>
|
||||
/// <param name="_group1"></param>
|
||||
public static Permission Create(global::Jellyfin.Data.Enums.PermissionKind kind, bool value, global::Jellyfin.Data.Entities.User _user0, global::Jellyfin.Data.Entities.Group _group1)
|
||||
{
|
||||
return new Permission(kind, value, _user0, _group1);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Kind
|
||||
/// </summary>
|
||||
protected global::Jellyfin.Data.Enums.PermissionKind _Kind;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Kind to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetKind(global::Jellyfin.Data.Enums.PermissionKind oldValue, ref global::Jellyfin.Data.Enums.PermissionKind newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Kind to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetKind(ref global::Jellyfin.Data.Enums.PermissionKind result);
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public global::Jellyfin.Data.Enums.PermissionKind Kind
|
||||
{
|
||||
get
|
||||
{
|
||||
global::Jellyfin.Data.Enums.PermissionKind value = _Kind;
|
||||
GetKind(ref value);
|
||||
return (_Kind = value);
|
||||
}
|
||||
set
|
||||
{
|
||||
global::Jellyfin.Data.Enums.PermissionKind oldValue = _Kind;
|
||||
SetKind(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
public partial class Permission
|
||||
{
|
||||
partial void Init();
|
||||
|
||||
/// <summary>
|
||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||
/// </summary>
|
||||
protected Permission()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
||||
/// </summary>
|
||||
public static Permission CreatePermissionUnsafe()
|
||||
{
|
||||
return new Permission();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Public constructor with required data
|
||||
/// </summary>
|
||||
/// <param name="kind"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="_user0"></param>
|
||||
/// <param name="_group1"></param>
|
||||
public Permission(Enums.PermissionKind kind, bool value, User _user0, Group _group1)
|
||||
{
|
||||
this.Kind = kind;
|
||||
|
||||
this.Value = value;
|
||||
|
||||
if (_user0 == null) throw new ArgumentNullException(nameof(_user0));
|
||||
_user0.Permissions.Add(this);
|
||||
|
||||
if (_group1 == null) throw new ArgumentNullException(nameof(_group1));
|
||||
_group1.GroupPermissions.Add(this);
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static create function (for use in LINQ queries, etc.)
|
||||
/// </summary>
|
||||
/// <param name="kind"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="_user0"></param>
|
||||
/// <param name="_group1"></param>
|
||||
public static Permission Create(Enums.PermissionKind kind, bool value, User _user0, Group _group1)
|
||||
{
|
||||
return new Permission(kind, value, _user0, _group1);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Backing field for Kind
|
||||
/// </summary>
|
||||
protected Enums.PermissionKind _Kind;
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Kind to be changed before setting.
|
||||
/// </summary>
|
||||
partial void SetKind(Enums.PermissionKind oldValue, ref Enums.PermissionKind newValue);
|
||||
/// <summary>
|
||||
/// When provided in a partial class, allows value of Kind to be changed before returning.
|
||||
/// </summary>
|
||||
partial void GetKind(ref Enums.PermissionKind result);
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Enums.PermissionKind Kind
|
||||
{
|
||||
get
|
||||
{
|
||||
_Kind = value;
|
||||
OnPropertyChanged();
|
||||
Enums.PermissionKind value = _Kind;
|
||||
GetKind(ref value);
|
||||
return (_Kind = value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public bool Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Concurrency token
|
||||
/// </summary>
|
||||
[Timestamp]
|
||||
public Byte[] Timestamp { get; set; }
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
public virtual event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
}
|
||||
set
|
||||
{
|
||||
Enums.PermissionKind oldValue = _Kind;
|
||||
SetKind(oldValue, ref value);
|
||||
if (oldValue != value)
|
||||
{
|
||||
_Kind = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public bool Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Required, ConcurrenyToken
|
||||
/// </summary>
|
||||
[ConcurrencyCheck]
|
||||
[Required]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
RowVersion++;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
public virtual event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue