Knocks/BackEnd/Knoks.Core/Entities/KnokImage.cs

35 lines
1.0 KiB
C#

using Knoks.Framework.DataAccess;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Text;
namespace Knoks.Core.Entities
{
public class KnokImage
{
/// <summary>
///Use to show
/// </summary>
public string Href { get; set; }
/// <summary>
/// Use to edit
/// </summary>
public string Url { get; set; }
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore), DefaultValue("")]
public string FileName { get; set; }
//public string ContentType { get; set; }
[ProcParamIgnore]
public byte[] Content { get; set; }
[ProcParamIgnore]
public string ContentBase64 { get; set; }//base64 image
[JsonIgnore, ProcParamIgnore]
public Stream ContentStream { get; set; }
public bool ShouldDeserializeHref() => false;
public bool ShouldSerializeContent() => false;
public bool ShouldSerializeContentBase64() => false;
}
}