namespace CloudGaming.Shared.Admin.Models.LowCodes; /// /// /// public class GenDbTableDto : LowCodeTable { /// /// 表字段信息 /// /// public List TableInfos { get; set; } /// /// 命名空间 /// public string? Namespace { get; set; } /// /// /// public string NamespacePrefix { get; set; } /// /// 获取后缀 /// /// public string GetPrefix() { return this.DataBase switch { "Game" or "Ext" => "Game\\", "App" or "User" => "User\\", _ => "" }; } private string _templateModel; /// /// 模型地址 /// public string TemplateModel { get { if (string.IsNullOrEmpty(_templateModel)) { _templateModel = GetPrefix() + "tempModel.cshtml"; } return _templateModel; } set { _templateModel = value; } } private string _templateService; /// /// 服务端 /// public string TemplateService { get { if (string.IsNullOrEmpty(_templateService)) { _templateService = GetPrefix() + "tempService.cshtml"; } return _templateService; } set { _templateService = value; } } private string _templateController; /// /// 控制器 /// public string TemplateController { get { if (string.IsNullOrEmpty(_templateController)) { _templateController = GetPrefix() + "tempController.cshtml"; } return _templateController; } set { _templateController = value; } } private string _templateServiceJs; /// /// 客户端服务器 /// public string TemplateServiceJs { get { if (string.IsNullOrEmpty(_templateServiceJs)) { _templateServiceJs = GetPrefix() + "tempClientService.cshtml"; } return _templateServiceJs; } set { _templateServiceJs = value; } } private string _templateIndex; /// /// 前端-首页 /// public string TemplateIndex { get { if (string.IsNullOrEmpty(_templateIndex)) { _templateIndex = GetPrefix() + "tempClientIndex.cshtml"; } return _templateIndex; } set { _templateIndex = value; } } private string _templateInfo; /// /// 前端-弹窗 /// public string TemplateInfo { get { if (string.IsNullOrEmpty(_templateInfo)) { _templateInfo = GetPrefix() + "tempClientInfo.cshtml"; } return _templateInfo; } set { _templateInfo = value; } } public GenDbTableDto ToGenDbTableDto() { string ex = GetPrefix(); this.TemplateModel = ex + "tempModel.cshtml"; this.TemplateService = ex + "tempService.cshtml"; this.TemplateController = ex + "tempController.cshtml"; this.TemplateServiceJs = ex + "tempClientService.cshtml"; this.TemplateIndex = ex + "tempClientIndex.cshtml"; this.TemplateInfo = ex + "tempClientInfo.cshtml"; return this; } }