Add filename for LeafInputData details
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using AutoMapper;
|
||||
using LeafWeb.Core.Entities;
|
||||
using LeafWeb.Core.Utility;
|
||||
@@ -11,11 +13,18 @@ namespace LeafWeb.WebCms.Models
|
||||
/// </summary>
|
||||
public class LeafInputDataViewModel
|
||||
{
|
||||
private static readonly Regex FilenamePrefixLength = new Regex(@"^(\d{14}clean)(.*)$") ;
|
||||
public int Id { get; set; }
|
||||
|
||||
[ParseInfo(3, alternateTitle: "Site name in full", exampleValue: "Your site's identifier / name")]
|
||||
public string SiteName { get; set; }
|
||||
|
||||
public string Filename { get; set; }
|
||||
|
||||
public string FilenameDatePrefix => FilenamePrefixLength.IsMatch(Filename) ? FilenamePrefixLength.Replace(Filename, "$1") : string.Empty;
|
||||
|
||||
public string FilenameOriginal => FilenamePrefixLength.IsMatch(Filename) ? FilenamePrefixLength.Replace(Filename, "$2") : Filename;
|
||||
|
||||
public LeafInputDataSiteViewModel Site { get; set; }
|
||||
|
||||
public List<LeafInputDataCurveViewModel> Data { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user