#1 basic model for PoemNarration

This commit is contained in:
Hamid Reza Mohammadi 2020-08-29 13:19:16 +04:30
parent f81402ced1
commit dcabfce2e8
3 changed files with 370 additions and 0 deletions

View File

@ -0,0 +1,39 @@
namespace RMuseum.Models.GanjoorAudio
{
/// <summary>
/// Audio Synchronization Status (binary combination is acceptable)
/// </summary>
public enum AudioSyncStatus
{
/// <summary>
/// no changed
/// </summary>
Synchronized = 0,
/// <summary>
/// new upload
/// </summary>
NewItem = 1,
/// <summary>
/// meta data should be updated
/// </summary>
MetadataChanged = 2,
/// <summary>
/// sound files should be reuploaded
/// </summary>
SoundFilesChanged = 4,
/// <summary>
/// Xml file should be reuploaded
/// </summary>
XmlFileChanged = 8,
/// <summary>
/// Item is deleted
/// </summary>
Deleted = 16
}
}

View File

@ -0,0 +1,152 @@
using RSecurityBackend.Models.Auth.Db;
using System;
namespace RMuseum.Models.GanjoorAudio
{
/// <summary>
/// Poem Narration
/// </summary>
public class PoemNarration
{
/// <summary>
/// Id
/// </summary>
public Guid Id { get; set; }
/// <summary>
/// Owner User
/// </summary>
public RAppUser Owner { get; set; }
/// <summary>
/// Owner User Id
/// </summary>
public Guid OwnerId { get; set; }
/// <summary>
/// Ganjoor Post Id
/// </summary>
public int GanjoorPostId { get; set; }
/// <summary>
/// This determines where an audio is displayed between a list of sounds related to a specfic poem
/// </summary>
public int AudioOrder { get; set; }
/// <summary>
/// Final data is actually exported to a MySQL database which this auto increment field is its key
/// </summary>
public int GanjoorAudioId { get; set; }
/// <summary>
/// Using this field content you would determine xml, mp3 and ogg file names
/// </summary>
public string FileNameWithoutExtension { get; set; }
/// <summary>
/// combining this with <see cref="FileNameWithoutExtension"/> + .ext would preduce relative path of sound files on our file server the full path would become [HOMEPath] + '/i/' + this value
/// </summary>
/// <sample>
/// "a2"
/// </sample>
/// <remarks>
/// We had previously used different pathes because when a directory became overcrowded our connection time would increase unbearably due to IRAN internet problems, so it is sensible to store it per record and not as a global option value
/// </remarks>
public string SoundFilesFolder { get; set; }
/// <summary>
/// MP3 File Path
/// </summary>
public string Mp3FilePath { get { return $"/i/{SoundFilesFolder}/{FileNameWithoutExtension}.mp3"; } }
/// <summary>
/// MP3 url
/// </summary>
public string Mp3Url { get { return $"https://i.ganjoor.net/{SoundFilesFolder}/{FileNameWithoutExtension}.mp3"; } }
/// <summary>
/// OGG File Path
/// </summary>
public string OggFilePath { get { return $"/i/{SoundFilesFolder}/{FileNameWithoutExtension}.ogg"; } }
/// <summary>
/// OGG url
/// </summary>
public string OggUrl { get { return $"https://i.ganjoor.net/{SoundFilesFolder}/{FileNameWithoutExtension}.ogg"; } }
/// <summary>
/// This is also a legacy field
/// </summary>
/// <sample>
/// "/i/a2/x"
/// </sample>
public string XMLFilePath { get { return $"/i/{SoundFilesFolder}/x/{FileNameWithoutExtension}.xml"; } }
/// <summary>
/// Audio Title
/// </summary>
public string AudioTitle { get; set; }
/// <summary>
/// Audio Artist
/// </summary>
public string AudioArtist { get; set; }
/// <summary>
/// Audio Artist Url
/// </summary>
public string AudioArtistUrl { get; set; }
/// <summary>
/// Audio Source
/// </summary>
public string AudioSrc { get; set; }
/// <summary>
/// Audio Src Url
/// </summary>
public string AudioSrcUrl { get; set; }
/// <summary>
/// Legacy Audio Guid
/// </summary>
public Guid LegacyAudioGuid { get; set; }
/// <summary>
/// Audio File CheckSum
/// </summary>
public string Mp3FileCheckSum { get; set; }
/// <summary>
/// mp3 size in bytes
/// </summary>
public int Mp3SizeInBytes { get; set; }
/// <summary>
/// ogg size in bytes
/// </summary>
public int OggSizeInBytes { get; set; }
/// <summary>
/// Audio Date
/// </summary>
public DateTime UploadDate { get; set; }
/// <summary>
/// MP3 File temporary pass on Windows Server
/// </summary>
public string TemporaryUploadedMp3FilePath { get; set; }
/// <summary>
/// XML File temporary pass on Windows Server
/// </summary>
public string TemporaryUploadedXmlFilePath { get; set; }
/// <summary>
/// Value is one or a combination of <see cref="RMuseum.Models.GanjoorAudio.AudioSyncStatus"/>
/// </summary>
public int AudioSyncStatus { get; set; }
}
}

View File

@ -1495,6 +1495,185 @@
User Note
</summary>
</member>
<member name="T:RMuseum.Models.GanjoorAudio.AudioSyncStatus">
<summary>
Audio Synchronization Status (binary combination is acceptable)
</summary>
</member>
<member name="F:RMuseum.Models.GanjoorAudio.AudioSyncStatus.Synchronized">
<summary>
no changed
</summary>
</member>
<member name="F:RMuseum.Models.GanjoorAudio.AudioSyncStatus.NewItem">
<summary>
new upload
</summary>
</member>
<member name="F:RMuseum.Models.GanjoorAudio.AudioSyncStatus.MetadataChanged">
<summary>
meta data should be updated
</summary>
</member>
<member name="F:RMuseum.Models.GanjoorAudio.AudioSyncStatus.SoundFilesChanged">
<summary>
sound files should be reuploaded
</summary>
</member>
<member name="F:RMuseum.Models.GanjoorAudio.AudioSyncStatus.XmlFileChanged">
<summary>
Xml file should be reuploaded
</summary>
</member>
<member name="F:RMuseum.Models.GanjoorAudio.AudioSyncStatus.Deleted">
<summary>
Item is deleted
</summary>
</member>
<member name="T:RMuseum.Models.GanjoorAudio.PoemNarration">
<summary>
Poem Narration
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.Id">
<summary>
Id
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.Owner">
<summary>
Owner User
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.OwnerId">
<summary>
Owner User Id
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.GanjoorPostId">
<summary>
Ganjoor Post Id
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.AudioOrder">
<summary>
This determines where an audio is displayed between a list of sounds related to a specfic poem
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.GanjoorAudioId">
<summary>
Final data is actually exported to a MySQL database which this auto increment field is its key
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.FileNameWithoutExtension">
<summary>
Using this field content you would determine xml, mp3 and ogg file names
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.SoundFilesFolder">
<summary>
combining this with <see cref="P:RMuseum.Models.GanjoorAudio.PoemNarration.FileNameWithoutExtension"/> + .ext would preduce relative path of sound files on our file server the full path would become [HOMEPath] + '/i/' + this value
</summary>
<sample>
"a2"
</sample>
<remarks>
We had previously used different pathes because when a directory became overcrowded our connection time would increase unbearably due to IRAN internet problems, so it is sensible to store it per record and not as a global option value
</remarks>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.Mp3FilePath">
<summary>
MP3 File Path
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.Mp3Url">
<summary>
MP3 url
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.OggFilePath">
<summary>
OGG File Path
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.OggUrl">
<summary>
OGG url
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.XMLFilePath">
<summary>
This is also a legacy field
</summary>
<sample>
"/i/a2/x"
</sample>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.AudioTitle">
<summary>
Audio Title
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.AudioArtist">
<summary>
Audio Artist
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.AudioArtistUrl">
<summary>
Audio Artist Url
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.AudioSrc">
<summary>
Audio Source
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.AudioSrcUrl">
<summary>
Audio Src Url
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.LegacyAudioGuid">
<summary>
Legacy Audio Guid
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.Mp3FileCheckSum">
<summary>
Audio File CheckSum
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.Mp3SizeInBytes">
<summary>
mp3 size in bytes
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.OggSizeInBytes">
<summary>
ogg size in bytes
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.UploadDate">
<summary>
Audio Date
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.TemporaryUploadedMp3FilePath">
<summary>
MP3 File temporary pass on Windows Server
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.TemporaryUploadedXmlFilePath">
<summary>
XML File temporary pass on Windows Server
</summary>
</member>
<member name="P:RMuseum.Models.GanjoorAudio.PoemNarration.AudioSyncStatus">
<summary>
Value is one or a combination of <see cref="T:RMuseum.Models.GanjoorAudio.AudioSyncStatus"/>
</summary>
</member>
<member name="T:RMuseum.Models.GanjoorIntegration.GanjoorLink">
<summary>
ganjoor link for artifacts and items