diff --git a/Entity/DbModel/BaseModel.cs b/Entity/DbModel/BaseModel.cs new file mode 100644 index 0000000..1665beb --- /dev/null +++ b/Entity/DbModel/BaseModel.cs @@ -0,0 +1,43 @@ +using SqlSugar; + +namespace Entity.DbModel; +/// +/// 业务model 基类 +/// +public class BaseModel +{ + /// + /// Desc:创建人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName = "created_by")] + public string? CreatedBy { get; set; } + + /// + /// Desc:创建时间 + /// Default:CURRENT_TIMESTAMP + /// Nullable:True + /// + /// [SugarColumn(IsPrimaryKey = false, , ColumnDescription = "创建时间")] + [SugarColumn(ColumnName = "created_time", InsertServerTime = true)] + public DateTime? CreatedTime { get; set; } + + + /// + /// Desc:更新人 + /// Default: + /// Nullable:True + /// + [SugarColumn(ColumnName = "updated_by")] + public string? UpdatedBy { get; set; } + + /// + /// Desc:更新时间 + /// Default:CURRENT_TIMESTAMP + /// Nullable:True + /// + [SugarColumn(ColumnName = "updated_time", UpdateServerTime = true)] + public DateTime? UpdatedTime { get; set; } = DateTime.Now; + +} \ No newline at end of file diff --git a/Entity/DbModel/Station/BatteryInfo.cs b/Entity/DbModel/Station/BatteryInfo.cs index ebd405a..9323d85 100644 --- a/Entity/DbModel/Station/BatteryInfo.cs +++ b/Entity/DbModel/Station/BatteryInfo.cs @@ -9,43 +9,12 @@ namespace Entity.DbModel.Station ///电池信息表 /// [SugarTable("battery_info")] - public partial class BatteryInfo + public partial class BatteryInfo : BaseModel { public BatteryInfo(){ } - /// - /// Desc:创建人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName="created_by")] - public string CreatedBy {get;set;} - - /// - /// Desc:创建时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName="created_time")] - public DateTime? CreatedTime {get;set;} - - /// - /// Desc:更新人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName="updated_by")] - public string UpdatedBy {get;set;} - - /// - /// Desc:更新时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName="updated_time")] - public DateTime? UpdatedTime {get;set;} - + } } diff --git a/Entity/DbModel/Station/BatteryOpModel.cs b/Entity/DbModel/Station/BatteryOpModel.cs index fece6bf..3a8b675 100644 --- a/Entity/DbModel/Station/BatteryOpModel.cs +++ b/Entity/DbModel/Station/BatteryOpModel.cs @@ -9,7 +9,7 @@ namespace Entity.DbModel.Station ///电池运营模型 /// [SugarTable("battery_op_model")] - public partial class BatteryOpModel + public partial class BatteryOpModel : BaseModel { public BatteryOpModel(){ @@ -31,37 +31,6 @@ namespace Entity.DbModel.Station [SugarColumn(ColumnName="model_id")] public int? ModelId {get;set;} - /// - /// Desc:创建人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName="created_by")] - public string CreatedBy {get;set;} - - /// - /// Desc:创建时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName="created_time")] - public DateTime? CreatedTime {get;set;} - - /// - /// Desc:更新人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName="updated_by")] - public string UpdatedBy {get;set;} - - /// - /// Desc:更新时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName="updated_time")] - public DateTime? UpdatedTime {get;set;} - + } } diff --git a/Entity/DbModel/Station/BatteryOpModelDetail.cs b/Entity/DbModel/Station/BatteryOpModelDetail.cs index c3213b6..5fc6115 100644 --- a/Entity/DbModel/Station/BatteryOpModelDetail.cs +++ b/Entity/DbModel/Station/BatteryOpModelDetail.cs @@ -9,7 +9,7 @@ namespace Entity.DbModel.Station ///电池运营模型详情 /// [SugarTable("battery_op_model_detail")] - public partial class BatteryOpModelDetail + public partial class BatteryOpModelDetail : BaseModel { public BatteryOpModelDetail(){ @@ -63,37 +63,6 @@ namespace Entity.DbModel.Station [SugarColumn(ColumnName="battery_type")] public string BatteryType {get;set;} - /// - /// Desc:创建人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName="created_by")] - public string CreatedBy {get;set;} - - /// - /// Desc:创建时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName="created_time")] - public DateTime? CreatedTime {get;set;} - - /// - /// Desc:更新人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName="updated_by")] - public string UpdatedBy {get;set;} - - /// - /// Desc:更新时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName="updated_time")] - public DateTime? UpdatedTime {get;set;} - + } } diff --git a/Entity/DbModel/Station/BinInfo.cs b/Entity/DbModel/Station/BinInfo.cs index 2fbaca6..ccc087a 100644 --- a/Entity/DbModel/Station/BinInfo.cs +++ b/Entity/DbModel/Station/BinInfo.cs @@ -6,7 +6,7 @@ namespace Entity.DbModel.Station ///仓位信息表 /// [SugarTable("bin_info")] - public partial class BinInfo + public partial class BinInfo : BaseModel { public BinInfo() { @@ -162,37 +162,6 @@ namespace Entity.DbModel.Station [SugarColumn(ColumnName = "status")] public int? Status { get; set; } - /// - /// Desc:创建人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName = "created_by")] - public string CreatedBy { get; set; } - - /// - /// Desc:创建时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName = "created_time")] - public DateTime? CreatedTime { get; set; } - - /// - /// Desc:更新人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName = "updated_by")] - public string UpdatedBy { get; set; } - - /// - /// Desc:更新时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName = "updated_time")] - public DateTime? UpdatedTime { get; set; } /// /// 缓存仓标记 0:不是 1:是 diff --git a/Entity/DbModel/Station/ChargeOrder.cs b/Entity/DbModel/Station/ChargeOrder.cs index c8bed15..d8c2473 100644 --- a/Entity/DbModel/Station/ChargeOrder.cs +++ b/Entity/DbModel/Station/ChargeOrder.cs @@ -6,7 +6,7 @@ namespace Entity.DbModel.Station ///充电订单;充电订单表 /// [SugarTable("charge_order")] - public partial class ChargeOrder + public partial class ChargeOrder : BaseModel { public ChargeOrder() { @@ -260,38 +260,7 @@ namespace Entity.DbModel.Station [SugarColumn(ColumnName = "cloud_report_status")] public int? CloudReportStatus { get; set; } - /// - /// Desc:创建人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName = "created_by")] - public string CreatedBy { get; set; } - - /// - /// Desc:创建时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName = "created_time")] - public DateTime CreatedTime { get; set; } - - /// - /// Desc:更新人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName = "updated_by")] - public string UpdatedBy { get; set; } - - /// - /// Desc:更新时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName = "updated_time")] - public DateTime? UpdatedTime { get; set; } - + /// /// Desc:云平台订单编号 /// Default: diff --git a/Entity/DbModel/Station/ElecPriceModelVersion.cs b/Entity/DbModel/Station/ElecPriceModelVersion.cs index 49639fa..6904a46 100644 --- a/Entity/DbModel/Station/ElecPriceModelVersion.cs +++ b/Entity/DbModel/Station/ElecPriceModelVersion.cs @@ -9,7 +9,7 @@ namespace Entity.DbModel.Station ///电价模型板板;电价模型版本表,生失效时间左开右闭且不能重叠 /// [SugarTable("elec_price_model_version")] - public partial class ElecPriceModelVersion + public partial class ElecPriceModelVersion : BaseModel { public ElecPriceModelVersion(){ @@ -47,37 +47,7 @@ namespace Entity.DbModel.Station [SugarColumn(ColumnName="end_time")] public DateTime? EndTime {get;set;} - /// - /// Desc:创建人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName="created_by")] - public string CreatedBy {get;set;} - - /// - /// Desc:创建时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName="created_time")] - public DateTime? CreatedTime {get;set;} - - /// - /// Desc:更新人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName="updated_by")] - public string UpdatedBy {get;set;} - - /// - /// Desc:更新时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName="updated_time")] - public DateTime? UpdatedTime {get;set;} + } } diff --git a/Entity/DbModel/Station/ElecPriceModelVersionDetail.cs b/Entity/DbModel/Station/ElecPriceModelVersionDetail.cs index a25bd21..22ea52a 100644 --- a/Entity/DbModel/Station/ElecPriceModelVersionDetail.cs +++ b/Entity/DbModel/Station/ElecPriceModelVersionDetail.cs @@ -6,7 +6,7 @@ namespace Entity.DbModel.Station ///电价模型详情 /// [SugarTable("elec_price_model_version_detail")] - public partial class ElecPriceModelVersionDetail + public partial class ElecPriceModelVersionDetail : BaseModel { public ElecPriceModelVersionDetail() { @@ -84,36 +84,6 @@ namespace Entity.DbModel.Station [SugarColumn(ColumnName = "battery_count")] public int BatteryCount { get; set; } - /// - /// Desc:创建人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName = "created_by")] - public string CreatedBy { get; set; } - - /// - /// Desc:创建时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName = "created_time")] - public DateTime? CreatedTime { get; set; } - - /// - /// Desc:更新人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName = "updated_by")] - public string UpdatedBy { get; set; } - - /// - /// Desc:更新时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName = "updated_time")] - public DateTime? UpdatedTime { get; set; } + } } \ No newline at end of file diff --git a/Entity/DbModel/Station/EquipInfo.cs b/Entity/DbModel/Station/EquipInfo.cs index 1b71f8c..bbb0dd5 100644 --- a/Entity/DbModel/Station/EquipInfo.cs +++ b/Entity/DbModel/Station/EquipInfo.cs @@ -9,7 +9,7 @@ namespace Entity.DbModel.Station ///设备信息表 /// [SugarTable("equip_info")] - public partial class EquipInfo + public partial class EquipInfo : BaseModel { public EquipInfo(){ @@ -55,37 +55,7 @@ namespace Entity.DbModel.Station [SugarColumn(ColumnName="status")] public int? Status {get;set;} - /// - /// Desc:创建人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName="created_by")] - public string CreatedBy {get;set;} - - /// - /// Desc:创建时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName="created_time")] - public DateTime? CreatedTime {get;set;} - - /// - /// Desc:更新人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName="updated_by")] - public string UpdatedBy {get;set;} - - /// - /// Desc:更新时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName="updated_time")] - public DateTime? UpdatedTime {get;set;} + /// /// Desc:0-手动;1-自动充电 diff --git a/Entity/DbModel/Station/EquipNetInfo.cs b/Entity/DbModel/Station/EquipNetInfo.cs index 747a64d..1d473a3 100644 --- a/Entity/DbModel/Station/EquipNetInfo.cs +++ b/Entity/DbModel/Station/EquipNetInfo.cs @@ -9,7 +9,7 @@ namespace Entity.DbModel.Station ///设备通信信息表 /// [SugarTable("equip_net_info")] - public partial class EquipNetInfo + public partial class EquipNetInfo : BaseModel { public EquipNetInfo(){ @@ -55,37 +55,6 @@ namespace Entity.DbModel.Station [SugarColumn(ColumnName="dest_addr")] public string DestAddr {get;set;} - /// - /// Desc:创建人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName="created_by")] - public string CreatedBy {get;set;} - - /// - /// Desc:创建时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName="created_time")] - public DateTime? CreatedTime {get;set;} - - /// - /// Desc:更新人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName="updated_by")] - public string UpdatedBy {get;set;} - - /// - /// Desc:更新时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName="updated_time")] - public DateTime? UpdatedTime {get;set;} } } diff --git a/Entity/DbModel/Station/EquipType.cs b/Entity/DbModel/Station/EquipType.cs index 7f9b447..1f003c0 100644 --- a/Entity/DbModel/Station/EquipType.cs +++ b/Entity/DbModel/Station/EquipType.cs @@ -9,7 +9,7 @@ namespace Entity.DbModel.Station ///设备类型表 /// [SugarTable("equip_type")] - public partial class EquipType + public partial class EquipType : BaseModel { public EquipType(){ @@ -47,37 +47,7 @@ namespace Entity.DbModel.Station [SugarColumn(ColumnName="enabled")] public int? Enabled {get;set;} - /// - /// Desc:创建人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName="created_by")] - public string CreatedBy {get;set;} - - /// - /// Desc:创建时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName="created_time")] - public DateTime? CreatedTime {get;set;} - - /// - /// Desc:更新人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName="updated_by")] - public string UpdatedBy {get;set;} - - /// - /// Desc:更新时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName="updated_time")] - public DateTime? UpdatedTime {get;set;} + } } diff --git a/Entity/DbModel/Station/SwapOrderBattery.cs b/Entity/DbModel/Station/SwapOrderBattery.cs index 989f054..3edbbc8 100644 --- a/Entity/DbModel/Station/SwapOrderBattery.cs +++ b/Entity/DbModel/Station/SwapOrderBattery.cs @@ -9,7 +9,7 @@ namespace Entity.DbModel.Station ///换电订单电池 /// [SugarTable("swap_order_battery")] - public partial class SwapOrderBattery + public partial class SwapOrderBattery : BaseModel { /// @@ -204,37 +204,6 @@ namespace Entity.DbModel.Station [SugarColumn(ColumnName = "up_battery_bin_no")] public int? UpBatteryBinNo { get; set; } - /// - /// Desc:创建人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName = "created_by")] - public string? CreatedBy { get; set; } - - /// - /// Desc:创建时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName = "created_time")] - public DateTime CreatedTime { get; set; } - - /// - /// Desc:更新人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName = "updated_by")] - public string? UpdatedBy { get; set; } - - /// - /// Desc:更新时间 - /// Default:CURRENT_TIMESTAMP - /// Nullable:True - /// - [SugarColumn(ColumnName = "updated_time")] - public DateTime? UpdatedTime { get; set; } - + } } diff --git a/Entity/DbModel/sysBatteryReplaceLog.cs b/Entity/DbModel/sysBatteryReplaceLog.cs deleted file mode 100644 index a0e9b89..0000000 --- a/Entity/DbModel/sysBatteryReplaceLog.cs +++ /dev/null @@ -1,16 +0,0 @@ -using SqlSugar; - -namespace Entity.DbModel; - -[SugarTable("sys_battery_replace_log")] -public class sysBatteryReplaceLog -{ - [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] - public int? f_id { get; set; } - - public string? f_new_battery_no { get; set; } - public string? f_old_battery_no { get; set; } - public string? f_new_battery_position { get; set; } - public string? f_old_battery_position { get; set; } - public string? f_start_time { get; set; } -} \ No newline at end of file diff --git a/Entity/DbModel/sysDataSource.cs b/Entity/DbModel/sysDataSource.cs deleted file mode 100644 index fc515e5..0000000 --- a/Entity/DbModel/sysDataSource.cs +++ /dev/null @@ -1,15 +0,0 @@ -using SqlSugar; - -namespace Entity.DbModel; - -public class sysDataSource -{ - [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] - public int ID { get; set; } - - public string ConnectName { get; set; } - public string Host { get; set; } - public string DataBaseName { get; set; } - public string Username { get; set; } - public string Password { get; set; } -} \ No newline at end of file diff --git a/Entity/DbModel/sysDicData.cs b/Entity/DbModel/sysDicData.cs deleted file mode 100644 index 87cd912..0000000 --- a/Entity/DbModel/sysDicData.cs +++ /dev/null @@ -1,38 +0,0 @@ -using SqlSugar; - -namespace Entity.DbModel; - -/// -/// -[SugarTable("sysDicData")] -public class sysDicData -{ - /// - /// Desc: - /// Default: - /// Nullable:False - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] - public int ID { get; set; } - - /// - /// Desc:字典类型ID - /// Default: - /// Nullable:True - /// - public int? DicTypeID { get; set; } - - /// - /// Desc:内容 - /// Default: - /// Nullable:True - /// - public string DicData { get; set; } - - /// - /// Desc:备注 - /// Default: - /// Nullable:True - /// - public string Remark { get; set; } -} \ No newline at end of file diff --git a/Entity/DbModel/sysDicType.cs b/Entity/DbModel/sysDicType.cs deleted file mode 100644 index 2a92c90..0000000 --- a/Entity/DbModel/sysDicType.cs +++ /dev/null @@ -1,38 +0,0 @@ -using SqlSugar; - -namespace Entity.DbModel; - -/// -/// -[SugarTable("sysDicType")] -public class sysDicType -{ - /// - /// Desc: - /// Default: - /// Nullable:False - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] - public int ID { get; set; } - - /// - /// Desc:字典类型名称 - /// Default: - /// Nullable:True - /// - public string DicTypeName { get; set; } - - /// - /// Desc:字典类型编码 - /// Default: - /// Nullable:True - /// - public string DicTypeCode { get; set; } - - /// - /// Desc:备注 - /// Default: - /// Nullable:True - /// - public string Remark { get; set; } -} \ No newline at end of file diff --git a/Entity/DbModel/sysMenu.cs b/Entity/DbModel/sysMenu.cs deleted file mode 100644 index e860de8..0000000 --- a/Entity/DbModel/sysMenu.cs +++ /dev/null @@ -1,101 +0,0 @@ -using SqlSugar; - -namespace Entity.DbModel; - -/// -/// -public class sysMenu -{ - /// - /// Desc:菜单ID - /// Default: - /// Nullable:False - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] - public int ID { get; set; } - - /// - /// Desc:父菜单ID - /// Default: - /// Nullable:True - /// - public int? ParentID { get; set; } - - /// - /// Desc:菜单标题 - /// Default: - /// Nullable:True - /// - - public string Title { get; set; } - - /// - /// Desc:菜单链接地址 - /// Default: - /// Nullable:True - /// - public string URL { get; set; } - - /// - /// Desc:菜单图标 - /// Default: - /// Nullable:True - /// - public string Icon { get; set; } - - /// - /// Desc:菜单排序顺序 - /// Default: - /// Nullable:True - /// - public int? SortOrder { get; set; } - - /// - /// Desc:菜单类型 - /// Default: - /// Nullable:True - /// - public string MenuType { get; set; } - - /// - /// Desc:菜单编码 - /// Default: - /// Nullable:True - /// - public string MenuCode { get; set; } - - /// - /// Desc:菜单权限标识 - /// Default: - /// Nullable:True - /// - public string PermissionCode { get; set; } - - /// - /// Desc:创建人 - /// Default: - /// Nullable:True - /// - public int? CreatedBy { get; set; } - - /// - /// Desc:创建时间 - /// Default: - /// Nullable:True - /// - public DateTime? CreatedDate { get; set; } - - /// - /// Desc:更新者 - /// Default: - /// Nullable:True - /// - public int? UpdatedBy { get; set; } - - /// - /// Desc:更新时间 - /// Default: - /// Nullable:True - /// - public DateTime? UpdatedDate { get; set; } -} \ No newline at end of file diff --git a/Entity/DbModel/sysMessage.cs b/Entity/DbModel/sysMessage.cs deleted file mode 100644 index 54d8c1b..0000000 --- a/Entity/DbModel/sysMessage.cs +++ /dev/null @@ -1,67 +0,0 @@ -using SqlSugar; - -namespace Entity.DbModel; - -/// -/// -[SugarTable("sys_message")] -public class sysMessage -{ - /// - /// Desc: - /// Default: - /// Nullable:False - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] - public int ID { get; set; } - - /// - /// Desc:消息标题 - /// Default: - /// Nullable:True - /// - public string Title { get; set; } - - /// - /// Desc:消息内容 - /// Default: - /// Nullable:True - /// - public string Content { get; set; } - - /// - /// Desc:发送人 - /// Default: - /// Nullable:True - /// - [SugarColumn(ColumnName = "from_user_id")] - public int? FromUserID { get; set; } - - /// - /// Desc:接收人 - /// Default: - /// Nullable:True - /// - public int? ToUserID { get; set; } - - /// - /// Desc:是否发送 - /// Default: - /// Nullable:True - /// - public bool? IsSend { get; set; } - - /// - /// Desc:创建时间 - /// Default: - /// Nullable:True - /// - public DateTime? CreateTime { get; set; } - - /// - /// Desc:发送时间 - /// Default: - /// Nullable:True - /// - public DateTime? SendTime { get; set; } -} \ No newline at end of file diff --git a/Entity/DbModel/sysRole.cs b/Entity/DbModel/sysRole.cs deleted file mode 100644 index 1bc9f49..0000000 --- a/Entity/DbModel/sysRole.cs +++ /dev/null @@ -1,59 +0,0 @@ -using SqlSugar; - -namespace Entity.DbModel; - -/// -/// -[SugarTable("sysRole")] -public class sysRole -{ - /// - /// Desc: - /// Default: - /// Nullable:False - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] - public int ID { get; set; } - - /// - /// Desc:角色名称 - /// Default: - /// Nullable:True - /// - public string RoleName { get; set; } - - /// - /// Desc:备注 - /// Default: - /// Nullable:True - /// - public string Remark { get; set; } - - /// - /// Desc:创建人 - /// Default: - /// Nullable:True - /// - public int? CreateBy { get; set; } - - /// - /// Desc:创建时间 - /// Default: - /// Nullable:True - /// - public DateTime? CreateTime { get; set; } - - /// - /// Desc:修改人 - /// Default: - /// Nullable:True - /// - public int? UpdateBy { get; set; } - - /// - /// Desc:修改时间 - /// Default: - /// Nullable:True - /// - public DateTime? UpdateTime { get; set; } -} \ No newline at end of file diff --git a/Entity/DbModel/sysRoleMenu.cs b/Entity/DbModel/sysRoleMenu.cs deleted file mode 100644 index 99bced5..0000000 --- a/Entity/DbModel/sysRoleMenu.cs +++ /dev/null @@ -1,23 +0,0 @@ -using SqlSugar; - -namespace Entity.DbModel; - -/// -/// -[SugarTable("sysRoleMenu")] -public class sysRoleMenu -{ - /// - /// Desc:角色ID - /// Default: - /// Nullable:True - /// - public int? RoleID { get; set; } - - /// - /// Desc:菜单ID - /// Default: - /// Nullable:True - /// - public int? MenuID { get; set; } -} \ No newline at end of file diff --git a/Entity/DbModel/sysUser.cs b/Entity/DbModel/sysUser.cs deleted file mode 100644 index 0d1aa07..0000000 --- a/Entity/DbModel/sysUser.cs +++ /dev/null @@ -1,79 +0,0 @@ -using SqlSugar; - -namespace Entity.DbModel; - -/// -/// -public class sysUser -{ - /// - /// Desc:唯一标识用户的主键 - /// Default: - /// Nullable:False - /// - [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] - public int ID { get; set; } - - /// - /// Desc:用户登录名 - /// Default: - /// Nullable:True - /// - public string Username { get; set; } - - /// - /// Desc:用户登录密码 - /// Default: - /// Nullable:True - /// - public string Password { get; set; } - - /// - /// Desc:用户姓名 - /// Default: - /// Nullable:True - /// - public string Fullname { get; set; } - - /// - /// Desc:性别 - /// Default: - /// Nullable:True - /// - public string Sex { get; set; } - - /// - /// Desc:用户电子邮件 - /// Default: - /// Nullable:True - /// - public string Email { get; set; } - - /// - /// Desc:用户手机号码 - /// Default: - /// Nullable:True - /// - public string PhoneNumber { get; set; } - - /// - /// Desc:账号创建时间 - /// Default: - /// Nullable:True - /// - public DateTime? CreateTime { get; set; } - - /// - /// Desc:最后登陆时间 - /// Default: - /// Nullable:True - /// - public DateTime? LastLoginTime { get; set; } - - /// - /// Desc:用户状态 启用 禁用 - /// Default: - /// Nullable:True - /// - public bool? Status { get; set; } -} \ No newline at end of file diff --git a/Entity/DbModel/sysUserRole.cs b/Entity/DbModel/sysUserRole.cs deleted file mode 100644 index 9237c4f..0000000 --- a/Entity/DbModel/sysUserRole.cs +++ /dev/null @@ -1,23 +0,0 @@ -using SqlSugar; - -namespace Entity.DbModel; - -/// -/// -[SugarTable("sysUserRole")] -public class sysUserRole -{ - /// - /// Desc:用户ID - /// Default: - /// Nullable:True - /// - public int? UserID { get; set; } - - /// - /// Desc:角色ID - /// Default: - /// Nullable:True - /// - public int? RoleID { get; set; } -} \ No newline at end of file diff --git a/Repository/System/Class1.cs b/Repository/System/Class1.cs deleted file mode 100644 index f4fa364..0000000 --- a/Repository/System/Class1.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace Repository.System; - -internal class Class1 -{ -} \ No newline at end of file diff --git a/Repository/System/SysBatteryReplaceLogRepository.cs b/Repository/System/SysBatteryReplaceLogRepository.cs deleted file mode 100644 index d728e67..0000000 --- a/Repository/System/SysBatteryReplaceLogRepository.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Entity.DbModel; -using SqlSugar; - -namespace Repository.System; - -public class SysBatteryReplaceLogRepository : BaseRepository -{ - public SysBatteryReplaceLogRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) - { - } -} \ No newline at end of file diff --git a/Repository/System/SysDataSourceRepository.cs b/Repository/System/SysDataSourceRepository.cs deleted file mode 100644 index d85e0cc..0000000 --- a/Repository/System/SysDataSourceRepository.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Entity.DbModel; -using SqlSugar; - -namespace Repository.System; - -public class SysDataSourceRepository : BaseRepository -{ - public SysDataSourceRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) - { - } -} \ No newline at end of file diff --git a/Repository/System/SysDicDataRepository.cs b/Repository/System/SysDicDataRepository.cs deleted file mode 100644 index d3df121..0000000 --- a/Repository/System/SysDicDataRepository.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Entity.DbModel; -using SqlSugar; - -namespace Repository.System; - -public class sysDicDataRepository : BaseRepository -{ - public sysDicDataRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) - { - } -} \ No newline at end of file diff --git a/Repository/System/SysDicTypeRepository.cs b/Repository/System/SysDicTypeRepository.cs deleted file mode 100644 index a8434dd..0000000 --- a/Repository/System/SysDicTypeRepository.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Entity.DbModel; -using SqlSugar; - -namespace Repository.System; - -public class sysDicTypeRepository : BaseRepository -{ - public sysDicTypeRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) - { - } -} \ No newline at end of file diff --git a/Repository/System/SysMenuRepository.cs b/Repository/System/SysMenuRepository.cs deleted file mode 100644 index 582c2d2..0000000 --- a/Repository/System/SysMenuRepository.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Entity.DbModel; -using SqlSugar; - -namespace Repository.System; - -public class SysMenuRepository : BaseRepository -{ - public SysMenuRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) - { - } -} \ No newline at end of file diff --git a/Repository/System/SysMessageRepository.cs b/Repository/System/SysMessageRepository.cs deleted file mode 100644 index ca162ad..0000000 --- a/Repository/System/SysMessageRepository.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Entity.DbModel; -using SqlSugar; - -namespace Repository.System; - -public class sysMessageRepository : BaseRepository -{ - public sysMessageRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) - { - } -} \ No newline at end of file diff --git a/Repository/System/SysRoleMenuRepository.cs b/Repository/System/SysRoleMenuRepository.cs deleted file mode 100644 index 3c2fccd..0000000 --- a/Repository/System/SysRoleMenuRepository.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Entity.DbModel; -using SqlSugar; - -namespace Repository.System; - -public class sysRoleMenuRepository : BaseRepository -{ - public sysRoleMenuRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) - { - } -} \ No newline at end of file diff --git a/Repository/System/SysRoleRepository.cs b/Repository/System/SysRoleRepository.cs deleted file mode 100644 index 8d0d678..0000000 --- a/Repository/System/SysRoleRepository.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Entity.DbModel; -using SqlSugar; - -namespace Repository.System; - -public class sysRoleRepository : BaseRepository -{ - public sysRoleRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) - { - } -} \ No newline at end of file diff --git a/Repository/System/SysUserRepository.cs b/Repository/System/SysUserRepository.cs deleted file mode 100644 index ec22d38..0000000 --- a/Repository/System/SysUserRepository.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Entity.DbModel; -using HybirdFrameworkCore.Autofac.Attribute; -using SqlSugar; - -namespace Repository.System; - -[Scope("SingleInstance")] -public class SysUserRepository : BaseRepository -{ - public SysUserRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) - { - } -} \ No newline at end of file diff --git a/Repository/System/SysUserRoleRepository.cs b/Repository/System/SysUserRoleRepository.cs deleted file mode 100644 index 102367f..0000000 --- a/Repository/System/SysUserRoleRepository.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Entity.DbModel; -using SqlSugar; - -namespace Repository.System; - -public class sysUserRoleRepository : BaseRepository -{ - public sysUserRoleRepository(ISqlSugarClient sqlSugar) : base(sqlSugar) - { - } -} \ No newline at end of file diff --git a/Service/System/SysBatteryReplaceLogServices.cs b/Service/System/SysBatteryReplaceLogServices.cs deleted file mode 100644 index 65a1d85..0000000 --- a/Service/System/SysBatteryReplaceLogServices.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Entity.DbModel; -using HybirdFrameworkCore.Autofac.Attribute; -using Repository.System; - -namespace Service.System; - -[Scope("SingleInstance")] -public class SysBatteryReplaceLogServices : BaseServices -{ - private readonly SysBatteryReplaceLogRepository _dal; - - public SysBatteryReplaceLogServices(SysBatteryReplaceLogRepository dal) - { - _dal = dal; - BaseDal = dal; - } - - public bool AddReplaceOrser(sysBatteryReplaceLog _sysBatteryReplaceLog) - { - var result = false; - if (_sysBatteryReplaceLog != null) - { - _dal.Insert(_sysBatteryReplaceLog); - result = true; - } - - return result; - } -} \ No newline at end of file diff --git a/Service/System/SysDataSourceServices.cs b/Service/System/SysDataSourceServices.cs deleted file mode 100644 index 6caceb7..0000000 --- a/Service/System/SysDataSourceServices.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Entity.DbModel; -using HybirdFrameworkCore.Autofac.Attribute; -using Repository.System; -using Repository.UnitOfWork; - -namespace Service.System; - -[Scope("SingleInstance")] -public class SysDataSourceServices : BaseServices -{ - private readonly SysDataSourceRepository _dal; - private readonly UnitOfWork _unitOfWork; - - public SysDataSourceServices(UnitOfWork unitOfWork, SysDataSourceRepository dal) - { - _dal = dal; - BaseDal = dal; - _unitOfWork = unitOfWork; - } -} \ No newline at end of file diff --git a/Service/System/SysDicDataServices.cs b/Service/System/SysDicDataServices.cs deleted file mode 100644 index a0a4c03..0000000 --- a/Service/System/SysDicDataServices.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Entity.DbModel; -using Repository.System; -using Repository.UnitOfWork; - -namespace Service.System; - -public class sysDicDataServices : BaseServices -{ - private readonly sysDicDataRepository _dal; - private readonly UnitOfWork _unitOfWork; - - public sysDicDataServices(UnitOfWork unitOfWork, sysDicDataRepository dal) - { - _dal = dal; - BaseDal = dal; - _unitOfWork = unitOfWork; - } -} \ No newline at end of file diff --git a/Service/System/SysDicTypeServices.cs b/Service/System/SysDicTypeServices.cs deleted file mode 100644 index 19b5fec..0000000 --- a/Service/System/SysDicTypeServices.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Entity.DbModel; -using Repository.System; -using Repository.UnitOfWork; - -namespace Service.System; - -public class sysDicTypeServices : BaseServices -{ - private readonly sysDicTypeRepository _dal; - private readonly UnitOfWork _unitOfWork; - - public sysDicTypeServices(UnitOfWork unitOfWork, sysDicTypeRepository dal) - { - _dal = dal; - BaseDal = dal; - _unitOfWork = unitOfWork; - } -} \ No newline at end of file diff --git a/Service/System/SysMenuServices.cs b/Service/System/SysMenuServices.cs deleted file mode 100644 index f561920..0000000 --- a/Service/System/SysMenuServices.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Entity.DbModel; -using Repository.System; -using Repository.UnitOfWork; - -namespace Service.System; - -public class SysMenuServices : BaseServices -{ - private readonly SysMenuRepository _dal; - private readonly UnitOfWork _unitOfWork; - - public SysMenuServices(UnitOfWork unitOfWork, SysMenuRepository dal) - { - _dal = dal; - BaseDal = dal; - _unitOfWork = unitOfWork; - } -} \ No newline at end of file diff --git a/Service/System/SysMessageServices.cs b/Service/System/SysMessageServices.cs deleted file mode 100644 index c42fe51..0000000 --- a/Service/System/SysMessageServices.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Entity.DbModel; -using Repository.System; -using Repository.UnitOfWork; - -namespace Service.System; - -public class sysMessageServices : BaseServices -{ - private readonly sysMessageRepository _dal; - private readonly UnitOfWork _unitOfWork; - - public sysMessageServices(UnitOfWork unitOfWork, sysMessageRepository dal) - { - _dal = dal; - BaseDal = dal; - _unitOfWork = unitOfWork; - } -} \ No newline at end of file diff --git a/Service/System/SysRoleMenuServices.cs b/Service/System/SysRoleMenuServices.cs deleted file mode 100644 index 5b21e5a..0000000 --- a/Service/System/SysRoleMenuServices.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Entity.DbModel; -using Repository.System; -using Repository.UnitOfWork; - -namespace Service.System; - -public class sysRoleMenuServices : BaseServices -{ - private readonly sysRoleMenuRepository _dal; - private readonly UnitOfWork _unitOfWork; - - public sysRoleMenuServices(UnitOfWork unitOfWork, sysRoleMenuRepository dal) - { - _dal = dal; - BaseDal = dal; - _unitOfWork = unitOfWork; - } -} \ No newline at end of file diff --git a/Service/System/SysRoleServices.cs b/Service/System/SysRoleServices.cs deleted file mode 100644 index 4b59722..0000000 --- a/Service/System/SysRoleServices.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Entity.DbModel; -using Repository.System; -using Repository.UnitOfWork; - -namespace Service.System; - -public class sysRoleServices : BaseServices -{ - private readonly sysRoleRepository _dal; - private readonly UnitOfWork _unitOfWork; - - public sysRoleServices(UnitOfWork unitOfWork, sysRoleRepository dal) - { - _dal = dal; - BaseDal = dal; - _unitOfWork = unitOfWork; - } -} \ No newline at end of file diff --git a/Service/System/SysUserRoleServices.cs b/Service/System/SysUserRoleServices.cs deleted file mode 100644 index 6175d25..0000000 --- a/Service/System/SysUserRoleServices.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Entity.DbModel; -using Repository.System; -using Repository.UnitOfWork; - -namespace Service.System; - -public class sysUserRoleServices : BaseServices -{ - private readonly sysUserRoleRepository _dal; - private readonly UnitOfWork _unitOfWork; - - public sysUserRoleServices(UnitOfWork unitOfWork, sysUserRoleRepository dal) - { - _dal = dal; - BaseDal = dal; - _unitOfWork = unitOfWork; - } -} \ No newline at end of file diff --git a/Service/System/SysUserServices.cs b/Service/System/SysUserServices.cs deleted file mode 100644 index 7a5b637..0000000 --- a/Service/System/SysUserServices.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Entity.DbModel; -using HybirdFrameworkCore.Autofac.Attribute; -using Repository.System; -using Repository.UnitOfWork; - -namespace Service.System; - -[Scope("SingleInstance")] -public class SysUserServices : BaseServices -{ - private readonly SysUserRepository _dal; - private readonly UnitOfWork _unitOfWork; - - public SysUserServices(UnitOfWork unitOfWork, SysUserRepository dal) - { - _dal = dal; - BaseDal = dal; - _unitOfWork = unitOfWork; - } -} \ No newline at end of file diff --git a/WebStarter/Controllers/Test/WeatherForecastController.cs b/WebStarter/Controllers/Test/WeatherForecastController.cs index a7ff4ac..96f18bc 100644 --- a/WebStarter/Controllers/Test/WeatherForecastController.cs +++ b/WebStarter/Controllers/Test/WeatherForecastController.cs @@ -21,12 +21,10 @@ public class WeatherForecastController : ControllerBase private readonly ILogger _logger; - private readonly SysUserServices _sysUserServices; - public WeatherForecastController(ILogger logger, SysUserServices sysUserServices) + public WeatherForecastController(ILogger logger) { _logger = logger; - _sysUserServices = sysUserServices; } [HttpGet(Name = "GetWeatherForecast")] diff --git a/WpfStarter/MainWindow.xaml.cs b/WpfStarter/MainWindow.xaml.cs index a8476a6..95b514e 100644 --- a/WpfStarter/MainWindow.xaml.cs +++ b/WpfStarter/MainWindow.xaml.cs @@ -13,17 +13,17 @@ public partial class MainWindow : Window { private static readonly ILog Log = LogManager.GetLogger(typeof(MainWindow)); - private readonly SysUserServices _sysUserServices; + private readonly SysConfigService _sysConfigService; public MainWindow() { InitializeComponent(); - _sysUserServices = AppInfo.Container.Resolve(); + _sysConfigService = AppInfo.Container.Resolve(); } private void TestClick(object sender, RoutedEventArgs e) { - var sysUsers = _sysUserServices.Query(); + var sysUsers = _sysConfigService.Query(); MessageBox.Show($"count={sysUsers.Count}"); Log.Info($"count={sysUsers.Count}"); }