This commit is contained in:
itcsx committed 2026-09-06 16:07:04 +08:00
1 parent 280ccf4de8
commit 032f048a16
25 files changed
+2673 -718

No files matched your search

@@ -98,7 +98,14 @@ builder.Entity<PublishVideoFamilyGroupEntity>().HasKey(c => new {c.FamilyName,c.
//***END***
builder.Entity<DmsFileUploadDeleteLogViewEntity>(eb => { eb.HasNoKey(); });
builder.Entity<DmsFileUploadDeleteLogViewEntity>(eb => { eb.HasNoKey(); });
//***END***
}
}
}
@@ -14,14 +14,16 @@ namespace CloudBuilder.Master.Entity
{
}
[Column("allow_delete_indc")]
public string AllowDeleteIndc { get; set; }
[Column("allow_rename_indc")]
public string AllowRenameIndc { get; set; }
[Column("created_by")]
public string CreatedBy { get; set; }
[Column("created_datetime")]
public DateTime CreatedDatetime { get; set; }
[Column("created_by")]
public string CreatedBy { get; set; }
[Column("updated_datetime")]
public DateTime UpdatedDatetime { get; set; }
[Column("updated_by")]
public string UpdatedBy { get; set; }
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("file_id")]
public long FileId { get; set; }
[Column("file_name")]
@@ -30,85 +32,79 @@ namespace CloudBuilder.Master.Entity
public string FilePath { get; set; }
[Column("file_size")]
public int FileSize { get; set; }
[Column("file_tag")]
public string? FileTag { get; set; }
[Column("file_type")]
public string? FileType { get; set; }
[Column("is_directory_indc")]
public string IsDirectoryIndc { get; set; }
[Column("is_link_indc")]
public string IsLinkIndc { get; set; }
[Column("landscape_indc")]
public string? LandscapeIndc { get; set; }
[Column("linked_file_id")]
public int LinkedFileId { get; set; }
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("log_id")]
public int LogId { get; set; }
[Column("order_key")]
public string? OrderKey { get; set; }
[Column("org_file_name")]
public string OrgFileName { get; set; }
[Column("ower_id")]
public string OwerId { get; set; }
[Column("revision_no")]
public int RevisionNo { get; set; }
[Column("is_directory_indc")]
public string IsDirectoryIndc { get; set; }
[Column("is_link_indc")]
public string IsLinkIndc { get; set; }
[Column("linked_file_id")]
public int LinkedFileId { get; set; }
[Column("org_file_name")]
public string OrgFileName { get; set; }
[Column("order_key")]
public string? OrderKey { get; set; }
[Column("file_tag")]
public string? FileTag { get; set; }
[Column("allow_rename_indc")]
public string AllowRenameIndc { get; set; }
[Column("allow_delete_indc")]
public string AllowDeleteIndc { get; set; }
[Column("file_type")]
public string? FileType { get; set; }
[Column("landscape_indc")]
public string? LandscapeIndc { get; set; }
[Column("transcode_indc")]
public string? TranscodeIndc { get; set; }
[Column("updated_by")]
public string UpdatedBy { get; set; }
[Column("updated_datetime")]
public DateTime UpdatedDatetime { get; set; }
public const string ALLOW_DELETE_INDC = "AllowDeleteIndc";
public const string ALLOW_RENAME_INDC = "AllowRenameIndc";
public const string CREATED_BY = "CreatedBy";
public const string CREATED_DATETIME = "CreatedDatetime";
public const string CREATED_BY = "CreatedBy";
public const string UPDATED_DATETIME = "UpdatedDatetime";
public const string UPDATED_BY = "UpdatedBy";
public const string FILE_ID = "FileId";
public const string FILE_NAME = "FileName";
public const string FILE_PATH = "FilePath";
public const string FILE_SIZE = "FileSize";
public const string FILE_TAG = "FileTag";
public const string FILE_TYPE = "FileType";
public const string IS_DIRECTORY_INDC = "IsDirectoryIndc";
public const string IS_LINK_INDC = "IsLinkIndc";
public const string LANDSCAPE_INDC = "LandscapeIndc";
public const string LINKED_FILE_ID = "LinkedFileId";
public const string LOG_ID = "LogId";
public const string ORDER_KEY = "OrderKey";
public const string ORG_FILE_NAME = "OrgFileName";
public const string OWER_ID = "OwerId";
public const string REVISION_NO = "RevisionNo";
public const string IS_DIRECTORY_INDC = "IsDirectoryIndc";
public const string IS_LINK_INDC = "IsLinkIndc";
public const string LINKED_FILE_ID = "LinkedFileId";
public const string ORG_FILE_NAME = "OrgFileName";
public const string ORDER_KEY = "OrderKey";
public const string FILE_TAG = "FileTag";
public const string ALLOW_RENAME_INDC = "AllowRenameIndc";
public const string ALLOW_DELETE_INDC = "AllowDeleteIndc";
public const string FILE_TYPE = "FileType";
public const string LANDSCAPE_INDC = "LandscapeIndc";
public const string TRANSCODE_INDC = "TranscodeIndc";
public const string UPDATED_BY = "UpdatedBy";
public const string UPDATED_DATETIME = "UpdatedDatetime";
public const string DB_NAME_DMS_FILE_DELETE_LOG = "dms_file_delete_log";
public const string DB_NAME_FIELDS="allow_delete_indc,allow_rename_indc,created_by,created_datetime,file_id,file_name,file_path,file_size,file_tag,file_type,is_directory_indc,is_link_indc,landscape_indc,linked_file_id,log_id,order_key,org_file_name,ower_id,revision_no,transcode_indc,updated_by,updated_datetime";
public const string DB_NAME_FIELDS="created_datetime,created_by,updated_datetime,updated_by,file_id,file_name,file_path,file_size,ower_id,revision_no,is_directory_indc,is_link_indc,linked_file_id,org_file_name,order_key,file_tag,allow_rename_indc,allow_delete_indc,file_type,landscape_indc,transcode_indc";
public const string DB_ALLOW_DELETE_INDC = "allow_delete_indc";
public const string DB_ALLOW_RENAME_INDC = "allow_rename_indc";
public const string DB_CREATED_BY = "created_by";
public const string DB_CREATED_DATETIME = "created_datetime";
public const string DB_CREATED_BY = "created_by";
public const string DB_UPDATED_DATETIME = "updated_datetime";
public const string DB_UPDATED_BY = "updated_by";
public const string DB_FILE_ID = "file_id";
public const string DB_FILE_NAME = "file_name";
public const string DB_FILE_PATH = "file_path";
public const string DB_FILE_SIZE = "file_size";
public const string DB_FILE_TAG = "file_tag";
public const string DB_FILE_TYPE = "file_type";
public const string DB_IS_DIRECTORY_INDC = "is_directory_indc";
public const string DB_IS_LINK_INDC = "is_link_indc";
public const string DB_LANDSCAPE_INDC = "landscape_indc";
public const string DB_LINKED_FILE_ID = "linked_file_id";
public const string DB_LOG_ID = "log_id";
public const string DB_ORDER_KEY = "order_key";
public const string DB_ORG_FILE_NAME = "org_file_name";
public const string DB_OWER_ID = "ower_id";
public const string DB_REVISION_NO = "revision_no";
public const string DB_IS_DIRECTORY_INDC = "is_directory_indc";
public const string DB_IS_LINK_INDC = "is_link_indc";
public const string DB_LINKED_FILE_ID = "linked_file_id";
public const string DB_ORG_FILE_NAME = "org_file_name";
public const string DB_ORDER_KEY = "order_key";
public const string DB_FILE_TAG = "file_tag";
public const string DB_ALLOW_RENAME_INDC = "allow_rename_indc";
public const string DB_ALLOW_DELETE_INDC = "allow_delete_indc";
public const string DB_FILE_TYPE = "file_type";
public const string DB_LANDSCAPE_INDC = "landscape_indc";
public const string DB_TRANSCODE_INDC = "transcode_indc";
public const string DB_UPDATED_BY = "updated_by";
public const string DB_UPDATED_DATETIME = "updated_datetime";
private string ProviderName { get; set; }
@@ -129,35 +125,34 @@ namespace CloudBuilder.Master.Entity
throw new NullReferenceException("Source entity is null.");
}
this.AllowDeleteIndc = source.AllowDeleteIndc;
this.AllowRenameIndc = source.AllowRenameIndc;
this.CreatedBy = source.CreatedBy;
this.CreatedDatetime = source.CreatedDatetime;
this.CreatedBy = source.CreatedBy;
this.UpdatedDatetime = source.UpdatedDatetime;
this.UpdatedBy = source.UpdatedBy;
this.FileId = source.FileId;
this.FileName = source.FileName;
this.FilePath = source.FilePath;
this.FileSize = source.FileSize;
this.FileTag = source.FileTag;
this.FileType = source.FileType;
this.IsDirectoryIndc = source.IsDirectoryIndc;
this.IsLinkIndc = source.IsLinkIndc;
this.LandscapeIndc = source.LandscapeIndc;
this.LinkedFileId = source.LinkedFileId;
this.LogId = source.LogId;
this.OrderKey = source.OrderKey;
this.OrgFileName = source.OrgFileName;
this.OwerId = source.OwerId;
this.RevisionNo = source.RevisionNo;
this.IsDirectoryIndc = source.IsDirectoryIndc;
this.IsLinkIndc = source.IsLinkIndc;
this.LinkedFileId = source.LinkedFileId;
this.OrgFileName = source.OrgFileName;
this.OrderKey = source.OrderKey;
this.FileTag = source.FileTag;
this.AllowRenameIndc = source.AllowRenameIndc;
this.AllowDeleteIndc = source.AllowDeleteIndc;
this.FileType = source.FileType;
this.LandscapeIndc = source.LandscapeIndc;
this.TranscodeIndc = source.TranscodeIndc;
this.UpdatedBy = source.UpdatedBy;
this.UpdatedDatetime = source.UpdatedDatetime;
if (includeSystemFields)
{
this.CreatedBy = source.CreatedBy;
this.CreatedDatetime = source.CreatedDatetime;
this.UpdatedBy = source.UpdatedBy;
this.CreatedBy = source.CreatedBy;
this.UpdatedDatetime = source.UpdatedDatetime;
this.UpdatedBy = source.UpdatedBy;
}
}
@@ -229,7 +224,7 @@ namespace CloudBuilder.Master.Entity
public string GetSelectTopFromByMySql(int limit, int start,string orderby,string orderbytag, string sqlWhere)
{
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_LOG_ID ;
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_FILE_ID ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_DMS_FILE_DELETE_LOG} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
@@ -237,7 +232,7 @@ namespace CloudBuilder.Master.Entity
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
{
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_LOG_ID ;
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_FILE_ID ;
string top = limit > 0 ? $"top {limit}" : "";
return $" select {top} {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_DMS_FILE_DELETE_LOG} with(nolock) where 1=1 {sqlWhere} ) a where num> {limit * (start - 1)}";
}
@@ -14,44 +14,44 @@ namespace CloudBuilder.Master.Entity
{
}
[Column("created_by")]
public string CreatedBy { get; set; }
[Column("created_datetime")]
public DateTime CreatedDatetime { get; set; }
[Column("file_category")]
public string FileCategory { get; set; }
[Column("created_by")]
public string CreatedBy { get; set; }
[Column("updated_datetime")]
public DateTime UpdatedDatetime { get; set; }
[Column("updated_by")]
public string UpdatedBy { get; set; }
[Key]
[Column("file_id")]
public long FileId { get; set; }
[Column("org_file_name")]
public string OrgFileName { get; set; }
[Column("updated_by")]
public string UpdatedBy { get; set; }
[Column("updated_datetime")]
public DateTime UpdatedDatetime { get; set; }
[Column("upload_name")]
public string UploadName { get; set; }
[Column("file_category")]
public string FileCategory { get; set; }
[Column("org_file_name")]
public string OrgFileName { get; set; }
public const string CREATED_BY = "CreatedBy";
public const string CREATED_DATETIME = "CreatedDatetime";
public const string FILE_CATEGORY = "FileCategory";
public const string FILE_ID = "FileId";
public const string ORG_FILE_NAME = "OrgFileName";
public const string UPDATED_BY = "UpdatedBy";
public const string CREATED_BY = "CreatedBy";
public const string UPDATED_DATETIME = "UpdatedDatetime";
public const string UPDATED_BY = "UpdatedBy";
public const string FILE_ID = "FileId";
public const string UPLOAD_NAME = "UploadName";
public const string FILE_CATEGORY = "FileCategory";
public const string ORG_FILE_NAME = "OrgFileName";
public const string DB_NAME_DMS_FILE_UPLOAD_DELETE_LOG = "dms_file_upload_delete_log";
public const string DB_NAME_FIELDS="created_by,created_datetime,file_category,file_id,org_file_name,updated_by,updated_datetime,upload_name";
public const string DB_NAME_FIELDS="created_datetime,created_by,updated_datetime,updated_by,file_id,upload_name,file_category,org_file_name";
public const string DB_CREATED_BY = "created_by";
public const string DB_CREATED_DATETIME = "created_datetime";
public const string DB_FILE_CATEGORY = "file_category";
public const string DB_FILE_ID = "file_id";
public const string DB_ORG_FILE_NAME = "org_file_name";
public const string DB_UPDATED_BY = "updated_by";
public const string DB_CREATED_BY = "created_by";
public const string DB_UPDATED_DATETIME = "updated_datetime";
public const string DB_UPDATED_BY = "updated_by";
public const string DB_FILE_ID = "file_id";
public const string DB_UPLOAD_NAME = "upload_name";
public const string DB_FILE_CATEGORY = "file_category";
public const string DB_ORG_FILE_NAME = "org_file_name";
private string ProviderName { get; set; }
@@ -72,21 +72,21 @@ namespace CloudBuilder.Master.Entity
throw new NullReferenceException("Source entity is null.");
}
this.CreatedBy = source.CreatedBy;
this.CreatedDatetime = source.CreatedDatetime;
this.FileCategory = source.FileCategory;
this.FileId = source.FileId;
this.OrgFileName = source.OrgFileName;
this.UpdatedBy = source.UpdatedBy;
this.CreatedBy = source.CreatedBy;
this.UpdatedDatetime = source.UpdatedDatetime;
this.UpdatedBy = source.UpdatedBy;
this.FileId = source.FileId;
this.UploadName = source.UploadName;
this.FileCategory = source.FileCategory;
this.OrgFileName = source.OrgFileName;
if (includeSystemFields)
{
this.CreatedBy = source.CreatedBy;
this.CreatedDatetime = source.CreatedDatetime;
this.UpdatedBy = source.UpdatedBy;
this.CreatedBy = source.CreatedBy;
this.UpdatedDatetime = source.UpdatedDatetime;
this.UpdatedBy = source.UpdatedBy;
}
}
@@ -14,102 +14,102 @@ namespace CloudBuilder.Master.Entity
{
}
[Column("allow_delete_indc")]
public string AllowDeleteIndc { get; set; }
[Column("allow_rename_indc")]
public string AllowRenameIndc { get; set; }
[Column("created_by")]
public string CreatedBy { get; set; }
[Column("created_datetime")]
public DateTime CreatedDatetime { get; set; }
[Column("file_category")]
public string FileCategory { get; set; }
[Column("created_by")]
public string CreatedBy { get; set; }
[Column("file_id")]
public long FileId { get; set; }
[Column("upload_name")]
public string UploadName { get; set; }
[Column("file_category")]
public string FileCategory { get; set; }
[Column("org_file_name")]
public string OrgFileName { get; set; }
[Column("file_name")]
public string FileName { get; set; }
[Column("file_path")]
public string FilePath { get; set; }
[Column("file_size")]
public int FileSize { get; set; }
[Column("file_tag")]
public string? FileTag { get; set; }
[Column("file_type")]
public string? FileType { get; set; }
[Column("folder_local_name")]
public string? FolderLocalName { get; set; }
[Column("is_directory_indc")]
public string IsDirectoryIndc { get; set; }
[Column("is_link_indc")]
public string IsLinkIndc { get; set; }
[Column("landscape_indc")]
public string? LandscapeIndc { get; set; }
[Column("linked_file_id")]
public int LinkedFileId { get; set; }
[Column("order_key")]
public string? OrderKey { get; set; }
[Column("org_file_name")]
public string OrgFileName { get; set; }
[Column("file_size")]
public int FileSize { get; set; }
[Column("ower_id")]
public string OwerId { get; set; }
[Column("revision_no")]
public int RevisionNo { get; set; }
[Column("is_directory_indc")]
public string IsDirectoryIndc { get; set; }
[Column("is_link_indc")]
public string IsLinkIndc { get; set; }
[Column("linked_file_id")]
public int LinkedFileId { get; set; }
[Column("order_key")]
public string? OrderKey { get; set; }
[Column("file_tag")]
public string? FileTag { get; set; }
[Column("allow_rename_indc")]
public string AllowRenameIndc { get; set; }
[Column("allow_delete_indc")]
public string AllowDeleteIndc { get; set; }
[Column("file_type")]
public string? FileType { get; set; }
[Column("landscape_indc")]
public string? LandscapeIndc { get; set; }
[Column("transcode_indc")]
public string? TranscodeIndc { get; set; }
[Column("upload_name")]
public string UploadName { get; set; }
[Column("url")]
public string Url { get; set; }
public const string ALLOW_DELETE_INDC = "AllowDeleteIndc";
public const string ALLOW_RENAME_INDC = "AllowRenameIndc";
public const string CREATED_BY = "CreatedBy";
public const string CREATED_DATETIME = "CreatedDatetime";
public const string FILE_CATEGORY = "FileCategory";
public const string CREATED_BY = "CreatedBy";
public const string FILE_ID = "FileId";
public const string UPLOAD_NAME = "UploadName";
public const string FILE_CATEGORY = "FileCategory";
public const string ORG_FILE_NAME = "OrgFileName";
public const string FILE_NAME = "FileName";
public const string FILE_PATH = "FilePath";
public const string FILE_SIZE = "FileSize";
public const string FILE_TAG = "FileTag";
public const string FILE_TYPE = "FileType";
public const string FOLDER_LOCAL_NAME = "FolderLocalName";
public const string IS_DIRECTORY_INDC = "IsDirectoryIndc";
public const string IS_LINK_INDC = "IsLinkIndc";
public const string LANDSCAPE_INDC = "LandscapeIndc";
public const string LINKED_FILE_ID = "LinkedFileId";
public const string ORDER_KEY = "OrderKey";
public const string ORG_FILE_NAME = "OrgFileName";
public const string FILE_SIZE = "FileSize";
public const string OWER_ID = "OwerId";
public const string REVISION_NO = "RevisionNo";
public const string IS_DIRECTORY_INDC = "IsDirectoryIndc";
public const string IS_LINK_INDC = "IsLinkIndc";
public const string LINKED_FILE_ID = "LinkedFileId";
public const string ORDER_KEY = "OrderKey";
public const string FILE_TAG = "FileTag";
public const string ALLOW_RENAME_INDC = "AllowRenameIndc";
public const string ALLOW_DELETE_INDC = "AllowDeleteIndc";
public const string FILE_TYPE = "FileType";
public const string LANDSCAPE_INDC = "LandscapeIndc";
public const string TRANSCODE_INDC = "TranscodeIndc";
public const string UPLOAD_NAME = "UploadName";
public const string URL = "Url";
public const string DB_NAME_DMS_FILE_UPLOAD_DELETE_LOG_VIEW = "dms_file_upload_delete_log_view";
public const string DB_NAME_FIELDS="allow_delete_indc,allow_rename_indc,created_by,created_datetime,file_category,file_id,file_name,file_path,file_size,file_tag,file_type,folder_local_name,is_directory_indc,is_link_indc,landscape_indc,linked_file_id,order_key,org_file_name,ower_id,revision_no,transcode_indc,upload_name,url";
public const string DB_NAME_FIELDS="created_datetime,created_by,file_id,upload_name,file_category,org_file_name,file_name,file_path,folder_local_name,file_size,ower_id,revision_no,is_directory_indc,is_link_indc,linked_file_id,order_key,file_tag,allow_rename_indc,allow_delete_indc,file_type,landscape_indc,transcode_indc,url";
public const string DB_ALLOW_DELETE_INDC = "allow_delete_indc";
public const string DB_ALLOW_RENAME_INDC = "allow_rename_indc";
public const string DB_CREATED_BY = "created_by";
public const string DB_CREATED_DATETIME = "created_datetime";
public const string DB_FILE_CATEGORY = "file_category";
public const string DB_CREATED_BY = "created_by";
public const string DB_FILE_ID = "file_id";
public const string DB_UPLOAD_NAME = "upload_name";
public const string DB_FILE_CATEGORY = "file_category";
public const string DB_ORG_FILE_NAME = "org_file_name";
public const string DB_FILE_NAME = "file_name";
public const string DB_FILE_PATH = "file_path";
public const string DB_FILE_SIZE = "file_size";
public const string DB_FILE_TAG = "file_tag";
public const string DB_FILE_TYPE = "file_type";
public const string DB_FOLDER_LOCAL_NAME = "folder_local_name";
public const string DB_IS_DIRECTORY_INDC = "is_directory_indc";
public const string DB_IS_LINK_INDC = "is_link_indc";
public const string DB_LANDSCAPE_INDC = "landscape_indc";
public const string DB_LINKED_FILE_ID = "linked_file_id";
public const string DB_ORDER_KEY = "order_key";
public const string DB_ORG_FILE_NAME = "org_file_name";
public const string DB_FILE_SIZE = "file_size";
public const string DB_OWER_ID = "ower_id";
public const string DB_REVISION_NO = "revision_no";
public const string DB_IS_DIRECTORY_INDC = "is_directory_indc";
public const string DB_IS_LINK_INDC = "is_link_indc";
public const string DB_LINKED_FILE_ID = "linked_file_id";
public const string DB_ORDER_KEY = "order_key";
public const string DB_FILE_TAG = "file_tag";
public const string DB_ALLOW_RENAME_INDC = "allow_rename_indc";
public const string DB_ALLOW_DELETE_INDC = "allow_delete_indc";
public const string DB_FILE_TYPE = "file_type";
public const string DB_LANDSCAPE_INDC = "landscape_indc";
public const string DB_TRANSCODE_INDC = "transcode_indc";
public const string DB_UPLOAD_NAME = "upload_name";
public const string DB_URL = "url";
private string ProviderName { get; set; }
@@ -131,34 +131,34 @@ namespace CloudBuilder.Master.Entity
throw new NullReferenceException("Source entity is null.");
}
this.AllowDeleteIndc = source.AllowDeleteIndc;
this.AllowRenameIndc = source.AllowRenameIndc;
this.CreatedBy = source.CreatedBy;
this.CreatedDatetime = source.CreatedDatetime;
this.FileCategory = source.FileCategory;
this.CreatedBy = source.CreatedBy;
this.FileId = source.FileId;
this.UploadName = source.UploadName;
this.FileCategory = source.FileCategory;
this.OrgFileName = source.OrgFileName;
this.FileName = source.FileName;
this.FilePath = source.FilePath;
this.FileSize = source.FileSize;
this.FileTag = source.FileTag;
this.FileType = source.FileType;
this.FolderLocalName = source.FolderLocalName;
this.IsDirectoryIndc = source.IsDirectoryIndc;
this.IsLinkIndc = source.IsLinkIndc;
this.LandscapeIndc = source.LandscapeIndc;
this.LinkedFileId = source.LinkedFileId;
this.OrderKey = source.OrderKey;
this.OrgFileName = source.OrgFileName;
this.FileSize = source.FileSize;
this.OwerId = source.OwerId;
this.RevisionNo = source.RevisionNo;
this.IsDirectoryIndc = source.IsDirectoryIndc;
this.IsLinkIndc = source.IsLinkIndc;
this.LinkedFileId = source.LinkedFileId;
this.OrderKey = source.OrderKey;
this.FileTag = source.FileTag;
this.AllowRenameIndc = source.AllowRenameIndc;
this.AllowDeleteIndc = source.AllowDeleteIndc;
this.FileType = source.FileType;
this.LandscapeIndc = source.LandscapeIndc;
this.TranscodeIndc = source.TranscodeIndc;
this.UploadName = source.UploadName;
this.Url = source.Url;
if (includeSystemFields)
{
this.CreatedBy = source.CreatedBy;
this.CreatedDatetime = source.CreatedDatetime;
this.CreatedBy = source.CreatedBy;
}
}
@@ -231,7 +231,7 @@ namespace CloudBuilder.Master.Entity
{
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_ALLOW_DELETE_INDC ; int offset = limit * (start - 1);
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_CREATED_DATETIME ; int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_DMS_FILE_UPLOAD_DELETE_LOG_VIEW} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
@@ -239,7 +239,7 @@ namespace CloudBuilder.Master.Entity
{
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_ALLOW_DELETE_INDC ; string top = limit > 0 ? $"top {limit}" : "";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_CREATED_DATETIME ; string top = limit > 0 ? $"top {limit}" : "";
return $" select {top} {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_DMS_FILE_UPLOAD_DELETE_LOG_VIEW} with(nolock) where 1=1 {sqlWhere} ) a where num> {limit * (start - 1)}";
}
@@ -14,45 +14,41 @@ namespace CloudBuilder.Master.Entity
{
}
[Column("created_by")]
public string CreatedBy { get; set; }
[Column("created_datetime")]
public DateTime CreatedDatetime { get; set; }
[Column("folder_id")]
public int FolderId { get; set; }
[Column("folder_local_name")]
public string? FolderLocalName { get; set; }
[Column("folder_name")]
public string FolderName { get; set; }
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("log_id")]
public long LogId { get; set; }
[Column("updated_by")]
public string UpdatedBy { get; set; }
[Column("created_by")]
public string CreatedBy { get; set; }
[Column("updated_datetime")]
public DateTime UpdatedDatetime { get; set; }
[Column("updated_by")]
public string UpdatedBy { get; set; }
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("folder_id")]
public long FolderId { get; set; }
[Column("folder_name")]
public string FolderName { get; set; }
[Column("folder_local_name")]
public string? FolderLocalName { get; set; }
public const string CREATED_BY = "CreatedBy";
public const string CREATED_DATETIME = "CreatedDatetime";
public const string FOLDER_ID = "FolderId";
public const string FOLDER_LOCAL_NAME = "FolderLocalName";
public const string FOLDER_NAME = "FolderName";
public const string LOG_ID = "LogId";
public const string UPDATED_BY = "UpdatedBy";
public const string CREATED_BY = "CreatedBy";
public const string UPDATED_DATETIME = "UpdatedDatetime";
public const string UPDATED_BY = "UpdatedBy";
public const string FOLDER_ID = "FolderId";
public const string FOLDER_NAME = "FolderName";
public const string FOLDER_LOCAL_NAME = "FolderLocalName";
public const string DB_NAME_DMS_FOLDER_DELETE_LOG = "dms_folder_delete_log";
public const string DB_NAME_FIELDS="created_by,created_datetime,folder_id,folder_local_name,folder_name,log_id,updated_by,updated_datetime";
public const string DB_NAME_FIELDS="created_datetime,created_by,updated_datetime,updated_by,folder_id,folder_name,folder_local_name";
public const string DB_CREATED_BY = "created_by";
public const string DB_CREATED_DATETIME = "created_datetime";
public const string DB_FOLDER_ID = "folder_id";
public const string DB_FOLDER_LOCAL_NAME = "folder_local_name";
public const string DB_FOLDER_NAME = "folder_name";
public const string DB_LOG_ID = "log_id";
public const string DB_UPDATED_BY = "updated_by";
public const string DB_CREATED_BY = "created_by";
public const string DB_UPDATED_DATETIME = "updated_datetime";
public const string DB_UPDATED_BY = "updated_by";
public const string DB_FOLDER_ID = "folder_id";
public const string DB_FOLDER_NAME = "folder_name";
public const string DB_FOLDER_LOCAL_NAME = "folder_local_name";
private string ProviderName { get; set; }
@@ -73,21 +69,20 @@ namespace CloudBuilder.Master.Entity
throw new NullReferenceException("Source entity is null.");
}
this.CreatedBy = source.CreatedBy;
this.CreatedDatetime = source.CreatedDatetime;
this.FolderId = source.FolderId;
this.FolderLocalName = source.FolderLocalName;
this.FolderName = source.FolderName;
this.LogId = source.LogId;
this.UpdatedBy = source.UpdatedBy;
this.CreatedBy = source.CreatedBy;
this.UpdatedDatetime = source.UpdatedDatetime;
this.UpdatedBy = source.UpdatedBy;
this.FolderId = source.FolderId;
this.FolderName = source.FolderName;
this.FolderLocalName = source.FolderLocalName;
if (includeSystemFields)
{
this.CreatedBy = source.CreatedBy;
this.CreatedDatetime = source.CreatedDatetime;
this.UpdatedBy = source.UpdatedBy;
this.CreatedBy = source.CreatedBy;
this.UpdatedDatetime = source.UpdatedDatetime;
this.UpdatedBy = source.UpdatedBy;
}
}
@@ -159,7 +154,7 @@ namespace CloudBuilder.Master.Entity
public string GetSelectTopFromByMySql(int limit, int start,string orderby,string orderbytag, string sqlWhere)
{
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_LOG_ID ;
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_FOLDER_ID ;
int offset = limit * (start - 1);
return $" select {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_DMS_FOLDER_DELETE_LOG} where 1=1 {sqlWhere} ) a where num> {offset} LIMIT {limit} ";
}
@@ -167,7 +162,7 @@ namespace CloudBuilder.Master.Entity
public string GetSelectTopFromBySqlServer(int limit, int start,string orderby,string orderbytag, string sqlWhere)
{
if (string.IsNullOrEmpty(orderbytag) || orderbytag.Trim() != "desc") orderbytag = "asc";
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_LOG_ID ;
if (string.IsNullOrEmpty(orderby) || !DB_NAME_FIELDS.Contains(orderby)) orderby = DB_FOLDER_ID ;
string top = limit > 0 ? $"top {limit}" : "";
return $" select {top} {DB_NAME_FIELDS} from (select {DB_NAME_FIELDS} ,row_number() over(order by {orderby} {orderbytag}) as num from { DB_NAME_DMS_FOLDER_DELETE_LOG} with(nolock) where 1=1 {sqlWhere} ) a where num> {limit * (start - 1)}";
}
@@ -14,39 +14,39 @@ namespace CloudBuilder.Master.Entity
{
}
[Column("created_by")]
public string CreatedBy { get; set; }
[Column("created_datetime")]
public DateTime CreatedDatetime { get; set; }
[Column("created_by")]
public string CreatedBy { get; set; }
[Column("updated_datetime")]
public DateTime UpdatedDatetime { get; set; }
[Column("updated_by")]
public string UpdatedBy { get; set; }
[Column("folder_name_parent")]
public string FolderNameParent { get; set; }
[Column("folder_name_son")]
public string FolderNameSon { get; set; }
[Column("orderby")]
public int Orderby { get; set; }
[Column("updated_by")]
public string UpdatedBy { get; set; }
[Column("updated_datetime")]
public DateTime UpdatedDatetime { get; set; }
public const string CREATED_BY = "CreatedBy";
public const string CREATED_DATETIME = "CreatedDatetime";
public const string CREATED_BY = "CreatedBy";
public const string UPDATED_DATETIME = "UpdatedDatetime";
public const string UPDATED_BY = "UpdatedBy";
public const string FOLDER_NAME_PARENT = "FolderNameParent";
public const string FOLDER_NAME_SON = "FolderNameSon";
public const string ORDERBY = "Orderby";
public const string UPDATED_BY = "UpdatedBy";
public const string UPDATED_DATETIME = "UpdatedDatetime";
public const string DB_NAME_DMS_FOLDER_MAP_DELETE_LOG = "dms_folder_map_delete_log";
public const string DB_NAME_FIELDS="created_by,created_datetime,folder_name_parent,folder_name_son,orderby,updated_by,updated_datetime";
public const string DB_NAME_FIELDS="created_datetime,created_by,updated_datetime,updated_by,folder_name_parent,folder_name_son,orderby";
public const string DB_CREATED_BY = "created_by";
public const string DB_CREATED_DATETIME = "created_datetime";
public const string DB_CREATED_BY = "created_by";
public const string DB_UPDATED_DATETIME = "updated_datetime";
public const string DB_UPDATED_BY = "updated_by";
public const string DB_FOLDER_NAME_PARENT = "folder_name_parent";
public const string DB_FOLDER_NAME_SON = "folder_name_son";
public const string DB_ORDERBY = "orderby";
public const string DB_UPDATED_BY = "updated_by";
public const string DB_UPDATED_DATETIME = "updated_datetime";
private string ProviderName { get; set; }
@@ -67,20 +67,20 @@ namespace CloudBuilder.Master.Entity
throw new NullReferenceException("Source entity is null.");
}
this.CreatedBy = source.CreatedBy;
this.CreatedDatetime = source.CreatedDatetime;
this.CreatedBy = source.CreatedBy;
this.UpdatedDatetime = source.UpdatedDatetime;
this.UpdatedBy = source.UpdatedBy;
this.FolderNameParent = source.FolderNameParent;
this.FolderNameSon = source.FolderNameSon;
this.Orderby = source.Orderby;
this.UpdatedBy = source.UpdatedBy;
this.UpdatedDatetime = source.UpdatedDatetime;
if (includeSystemFields)
{
this.CreatedBy = source.CreatedBy;
this.CreatedDatetime = source.CreatedDatetime;
this.UpdatedBy = source.UpdatedBy;
this.CreatedBy = source.CreatedBy;
this.UpdatedDatetime = source.UpdatedDatetime;
this.UpdatedBy = source.UpdatedBy;
}
}
@@ -36,5 +36,13 @@ namespace CloudBuilder.Master.Policy
public const string AUDIO_PUBLISH = "AUDIO_PUBLISH";
public const string AUDIO_PUBLISH_PUBLISH_NAME = "PUBLISH_NAME";
public const string DMS_FOLDER_DELETE_LOG = "DMS_FOLDER_DELETE_LOG";
public const string DMS_FOLDER_DELETE_LOG_FOLDER_NAME = "FOLDER_NAME";
public const string UPLOAD_DMS_FILE_DELETE_LOG = "DMS_FOLDER_DELETE_LOG";
public const string UPLOAD_DMS_FILE_DELETE_LOG_UPLOAD_NAME = "UPLOAD_NAME";
public const string UPLOAD_DMS_FILE_DELETE_LOG_FORMAT = "00000000";
}
}
@@ -17,6 +17,7 @@ namespace CloudBuilder.Master.Service
DmsFileEntity CreateDmsFile(DmsFileEntity dmsFile);
string CreateDmsFolder(DmsFileEntity dmsFile);
void RestoreDmsFile(long fileId);
void UpdateDmsFolder(DmsFileEntity dmsFile);