CompanyMetadata.cs 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. #pragma warning disable CS1591
  2. using System;
  3. using System.ComponentModel.DataAnnotations;
  4. namespace Jellyfin.Data.Entities
  5. {
  6. public partial class CompanyMetadata : Metadata
  7. {
  8. partial void Init();
  9. /// <summary>
  10. /// Default constructor. Protected due to required properties, but present because EF needs it.
  11. /// </summary>
  12. protected CompanyMetadata()
  13. {
  14. Init();
  15. }
  16. /// <summary>
  17. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
  18. /// </summary>
  19. public static CompanyMetadata CreateCompanyMetadataUnsafe()
  20. {
  21. return new CompanyMetadata();
  22. }
  23. /// <summary>
  24. /// Public constructor with required data.
  25. /// </summary>
  26. /// <param name="title">The title or name of the object.</param>
  27. /// <param name="language">ISO-639-3 3-character language codes.</param>
  28. /// <param name="dateadded">The date the object was added.</param>
  29. /// <param name="datemodified">The date the object was last modified.</param>
  30. /// <param name="_company0"></param>
  31. public CompanyMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Company _company0)
  32. {
  33. if (string.IsNullOrEmpty(title))
  34. {
  35. throw new ArgumentNullException(nameof(title));
  36. }
  37. this.Title = title;
  38. if (string.IsNullOrEmpty(language))
  39. {
  40. throw new ArgumentNullException(nameof(language));
  41. }
  42. this.Language = language;
  43. if (_company0 == null)
  44. {
  45. throw new ArgumentNullException(nameof(_company0));
  46. }
  47. _company0.CompanyMetadata.Add(this);
  48. Init();
  49. }
  50. /// <summary>
  51. /// Static create function (for use in LINQ queries, etc.)
  52. /// </summary>
  53. /// <param name="title">The title or name of the object.</param>
  54. /// <param name="language">ISO-639-3 3-character language codes.</param>
  55. /// <param name="dateadded">The date the object was added.</param>
  56. /// <param name="datemodified">The date the object was last modified.</param>
  57. /// <param name="_company0"></param>
  58. public static CompanyMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Company _company0)
  59. {
  60. return new CompanyMetadata(title, language, dateadded, datemodified, _company0);
  61. }
  62. /*************************************************************************
  63. * Properties
  64. *************************************************************************/
  65. /// <summary>
  66. /// Backing field for Description.
  67. /// </summary>
  68. protected string _Description;
  69. /// <summary>
  70. /// When provided in a partial class, allows value of Description to be changed before setting.
  71. /// </summary>
  72. partial void SetDescription(string oldValue, ref string newValue);
  73. /// <summary>
  74. /// When provided in a partial class, allows value of Description to be changed before returning.
  75. /// </summary>
  76. partial void GetDescription(ref string result);
  77. /// <summary>
  78. /// Max length = 65535
  79. /// </summary>
  80. [MaxLength(65535)]
  81. [StringLength(65535)]
  82. public string Description
  83. {
  84. get
  85. {
  86. string value = _Description;
  87. GetDescription(ref value);
  88. return _Description = value;
  89. }
  90. set
  91. {
  92. string oldValue = _Description;
  93. SetDescription(oldValue, ref value);
  94. if (oldValue != value)
  95. {
  96. _Description = value;
  97. }
  98. }
  99. }
  100. /// <summary>
  101. /// Backing field for Headquarters.
  102. /// </summary>
  103. protected string _Headquarters;
  104. /// <summary>
  105. /// When provided in a partial class, allows value of Headquarters to be changed before setting.
  106. /// </summary>
  107. partial void SetHeadquarters(string oldValue, ref string newValue);
  108. /// <summary>
  109. /// When provided in a partial class, allows value of Headquarters to be changed before returning.
  110. /// </summary>
  111. partial void GetHeadquarters(ref string result);
  112. /// <summary>
  113. /// Max length = 255
  114. /// </summary>
  115. [MaxLength(255)]
  116. [StringLength(255)]
  117. public string Headquarters
  118. {
  119. get
  120. {
  121. string value = _Headquarters;
  122. GetHeadquarters(ref value);
  123. return _Headquarters = value;
  124. }
  125. set
  126. {
  127. string oldValue = _Headquarters;
  128. SetHeadquarters(oldValue, ref value);
  129. if (oldValue != value)
  130. {
  131. _Headquarters = value;
  132. }
  133. }
  134. }
  135. /// <summary>
  136. /// Backing field for Country.
  137. /// </summary>
  138. protected string _Country;
  139. /// <summary>
  140. /// When provided in a partial class, allows value of Country to be changed before setting.
  141. /// </summary>
  142. partial void SetCountry(string oldValue, ref string newValue);
  143. /// <summary>
  144. /// When provided in a partial class, allows value of Country to be changed before returning.
  145. /// </summary>
  146. partial void GetCountry(ref string result);
  147. /// <summary>
  148. /// Max length = 2
  149. /// </summary>
  150. [MaxLength(2)]
  151. [StringLength(2)]
  152. public string Country
  153. {
  154. get
  155. {
  156. string value = _Country;
  157. GetCountry(ref value);
  158. return _Country = value;
  159. }
  160. set
  161. {
  162. string oldValue = _Country;
  163. SetCountry(oldValue, ref value);
  164. if (oldValue != value)
  165. {
  166. _Country = value;
  167. }
  168. }
  169. }
  170. /// <summary>
  171. /// Backing field for Homepage.
  172. /// </summary>
  173. protected string _Homepage;
  174. /// <summary>
  175. /// When provided in a partial class, allows value of Homepage to be changed before setting.
  176. /// </summary>
  177. partial void SetHomepage(string oldValue, ref string newValue);
  178. /// <summary>
  179. /// When provided in a partial class, allows value of Homepage to be changed before returning.
  180. /// </summary>
  181. partial void GetHomepage(ref string result);
  182. /// <summary>
  183. /// Max length = 1024
  184. /// </summary>
  185. [MaxLength(1024)]
  186. [StringLength(1024)]
  187. public string Homepage
  188. {
  189. get
  190. {
  191. string value = _Homepage;
  192. GetHomepage(ref value);
  193. return _Homepage = value;
  194. }
  195. set
  196. {
  197. string oldValue = _Homepage;
  198. SetHomepage(oldValue, ref value);
  199. if (oldValue != value)
  200. {
  201. _Homepage = value;
  202. }
  203. }
  204. }
  205. /*************************************************************************
  206. * Navigation properties
  207. *************************************************************************/
  208. }
  209. }