mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-29 11:02:14 +01:00
Clean up generated code
This commit is contained in:
@@ -1,15 +1,3 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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;
|
||||
@@ -21,95 +9,106 @@ using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Jellyfin.Data.Entities
|
||||
{
|
||||
public partial class Group
|
||||
{
|
||||
partial void Init();
|
||||
[Table("Group")]
|
||||
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>();
|
||||
/// <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();
|
||||
}
|
||||
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>
|
||||
/// 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;
|
||||
/// <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);
|
||||
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>();
|
||||
this.GroupPermissions = new HashSet<Permission>();
|
||||
this.ProviderMappings = new HashSet<ProviderMapping>();
|
||||
this.Preferences = new HashSet<Preference>();
|
||||
|
||||
Init();
|
||||
}
|
||||
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);
|
||||
}
|
||||
/// <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
|
||||
*************************************************************************/
|
||||
/*************************************************************************
|
||||
* Properties
|
||||
*************************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// Identity, Indexed, Required
|
||||
/// </summary>
|
||||
[Key]
|
||||
[Required]
|
||||
public int Id { get; protected set; }
|
||||
/// <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, Max length = 255
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MaxLength(255)]
|
||||
[StringLength(255)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Concurrency token
|
||||
/// </summary>
|
||||
[Timestamp]
|
||||
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.Permission> GroupPermissions { get; protected set; }
|
||||
/*************************************************************************
|
||||
* Navigation properties
|
||||
*************************************************************************/
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.ProviderMapping> ProviderMappings { get; protected set; }
|
||||
[ForeignKey("Permission_GroupPermissions_Id")]
|
||||
public virtual ICollection<Permission> GroupPermissions { get; protected set; }
|
||||
|
||||
public virtual ICollection<global::Jellyfin.Data.Entities.Preference> Preferences { 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; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user