From 20cf421a3c773b7cb077f38055a52c3d6aad0157 Mon Sep 17 00:00:00 2001
From: cheche <717840555@qq.com>
Date: Wed, 13 Mar 2024 14:20:52 +0800
Subject: [PATCH] =?UTF-8?q?feat=20=E8=8F=9C=E5=8D=95=E8=8F=9C=E5=93=81?=
=?UTF-8?q?=E5=AE=9E=E4=BD=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Canteen/Entities/CanteenDishesEntity.cs | 91 +++++++++++++
.../Canteen/Entities/CanteenMenuEntity.cs | 67 ++++++++++
.../Entities/MiniProgramOrderEntity.cs | 120 ++++++++++++++++++
.../Canteen/Entities/OrderDetailsEntity.cs | 79 ++++++++++++
.../Canteen/Enums/CanteenDishesEnumType.cs | 35 +++++
.../Canteen/Enums/CanteenPayEnumType.cs | 28 ++++
.../Enums/MiniProgramOrderStatusEnumType.cs | 36 ++++++
.../Enums/OrderDetailsStatusEnumType.cs | 22 ++++
8 files changed, 478 insertions(+)
create mode 100644 Src/Dlhis.Entity/Canteen/Entities/CanteenDishesEntity.cs
create mode 100644 Src/Dlhis.Entity/Canteen/Entities/CanteenMenuEntity.cs
create mode 100644 Src/Dlhis.Entity/Canteen/Entities/MiniProgramOrderEntity.cs
create mode 100644 Src/Dlhis.Entity/Canteen/Entities/OrderDetailsEntity.cs
create mode 100644 Src/Dlhis.Entity/Canteen/Enums/CanteenDishesEnumType.cs
create mode 100644 Src/Dlhis.Entity/Canteen/Enums/CanteenPayEnumType.cs
create mode 100644 Src/Dlhis.Entity/Canteen/Enums/MiniProgramOrderStatusEnumType.cs
create mode 100644 Src/Dlhis.Entity/Canteen/Enums/OrderDetailsStatusEnumType.cs
diff --git a/Src/Dlhis.Entity/Canteen/Entities/CanteenDishesEntity.cs b/Src/Dlhis.Entity/Canteen/Entities/CanteenDishesEntity.cs
new file mode 100644
index 00000000..b1136216
--- /dev/null
+++ b/Src/Dlhis.Entity/Canteen/Entities/CanteenDishesEntity.cs
@@ -0,0 +1,91 @@
+using Dlhis.Entity.Canteen.Enums;
+using Kurisu.SqlSugar;
+using SqlSugar;
+using SqlSugar.DbConvert;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Dlhis.Entity.Canteen.Entities
+{
+ ///
+ /// 菜品表
+ ///
+ [SugarTable(TableName = "CanteenDishes", TableDescription = "菜品表")]
+ public class CanteenDishesEntity : SugarBaseEntity
+ {
+ ///
+ /// 菜单编码
+ ///
+ [SugarColumn(ColumnDescription = "菜单编码")]
+ public Guid MenuCode { get; set; }
+
+ ///
+ /// 大类
+ ///
+ [SugarColumn(ColumnDescription = "大类")]
+ public string Categories { get; set; }
+
+ ///
+ /// 小类
+ ///
+ [SugarColumn(ColumnDescription = "小类")]
+ public string SubCategories { get; set; }
+
+ ///
+ /// 菜品编码
+ ///
+ [SugarColumn(ColumnDescription = "菜品编码")]
+ public Guid Code { get; set; }
+
+ ///
+ /// 菜品名称
+ ///
+ [SugarColumn(ColumnDescription = "菜品名称")]
+ public string Name { get; set; }
+
+ ///
+ /// 类型
+ ///
+ [SugarColumn(ColumnDescription = "类型", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
+ public CanteenDishesEnumType Type { get; set; }
+
+ ///
+ /// 描述
+ ///
+ [SugarColumn(ColumnDescription = "描述")]
+ public string Description { get; set; }
+
+ ///
+ /// 单价
+ ///
+ [SugarColumn(ColumnDescription = "单价")]
+ public decimal Amount { get; set; }
+
+ ///
+ /// 单位
+ ///
+ [SugarColumn(ColumnDescription = "单位")]
+ public string Unit { get; set; }
+
+ ///
+ /// 限售份数
+ ///
+ [SugarColumn(ColumnDescription = "限售份数")]
+ public int RestrictedNum { get; set; }
+
+ ///
+ /// 图片
+ ///
+ [SugarColumn(ColumnDescription = "图片")]
+ public string Image { get; set; }
+
+ ///
+ /// 是否启用
+ ///
+ [SugarColumn(ColumnDataType = "bit", ColumnDescription = "是否启用")]
+ public bool Enable { get; set; }
+ }
+}
diff --git a/Src/Dlhis.Entity/Canteen/Entities/CanteenMenuEntity.cs b/Src/Dlhis.Entity/Canteen/Entities/CanteenMenuEntity.cs
new file mode 100644
index 00000000..1973fecd
--- /dev/null
+++ b/Src/Dlhis.Entity/Canteen/Entities/CanteenMenuEntity.cs
@@ -0,0 +1,67 @@
+using Kurisu.SqlSugar;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Dlhis.Entity.Canteen.Entities;
+
+///
+/// 菜单表
+///
+[SugarTable(TableName = "CanteenMenu", TableDescription = "菜单表")]
+public class CanteenMenuEntity : SugarBaseEntity
+{
+
+ ///
+ /// 菜单编码
+ ///
+ [SugarColumn(ColumnDescription = "菜单编码")]
+ public Guid Code { get; set; }
+
+ ///
+ /// 菜单名称
+ ///
+ [SugarColumn(ColumnDescription = "菜单名称")]
+ public string Name { get; set; }
+
+ ///
+ /// 所属营业点
+ ///
+ [SugarColumn(ColumnDescription = "所属营业点")]
+ public Guid PlaceCode { get; set; }
+
+ ///
+ /// 厂区
+ ///
+ [SugarColumn(ColumnDescription = "厂区")]
+ public string Factory { get; set; }
+
+ ///
+ /// 开始日期
+ ///
+ [SugarColumn(ColumnDescription = "开始日期")]
+ public DateOnly StartDate { get; set; }
+
+ ///
+ /// 结束日期
+ ///
+ [SugarColumn(ColumnDescription = "结束日期")]
+ public DateOnly EndDate { get; set; }
+
+ ///
+ /// 餐次段
+ ///
+ [SugarColumn(ColumnDescription = "餐次段", IsNullable = true)]
+ public List ShiftTypes { get; set; }
+
+ ///
+ /// 是否启用
+ ///
+ [SugarColumn(ColumnDataType = "bit", ColumnDescription = "是否启用")]
+ public bool Enable { get; set; }
+}
+
+
diff --git a/Src/Dlhis.Entity/Canteen/Entities/MiniProgramOrderEntity.cs b/Src/Dlhis.Entity/Canteen/Entities/MiniProgramOrderEntity.cs
new file mode 100644
index 00000000..4efab394
--- /dev/null
+++ b/Src/Dlhis.Entity/Canteen/Entities/MiniProgramOrderEntity.cs
@@ -0,0 +1,120 @@
+using Dlhis.Entity.Canteen.Enums;
+using Kurisu.SqlSugar;
+using SqlSugar;
+using SqlSugar.DbConvert;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Dlhis.Entity.Canteen.Entities
+{
+ ///
+ /// 小程序订单表
+ ///
+ [SugarTable(TableName = "MiniProgramOrder", TableDescription = "小程序订单表")]
+ public class MiniProgramOrderEntity : SugarBaseEntity
+ {
+ ///
+ /// 订单号
+ ///
+ [SugarColumn(ColumnDescription = "订单号")]
+ public string No { get; set; }
+
+ ///
+ /// 姓名
+ ///
+ [SugarColumn(ColumnDescription = "姓名")]
+ public string Name { get; set; }
+
+ ///
+ /// 工号
+ ///
+ [SugarColumn(ColumnDescription = "工号")]
+ public string Code { get; set; }
+
+ ///
+ /// 人事范围
+ ///
+ [SugarColumn(ColumnDescription = "人事范围")]
+ public string Werks { get; set; }
+
+ ///
+ /// 部门编码
+ ///
+ [SugarColumn(ColumnDescription = "部门编码")]
+ public string DepartmentNo { get; set; }
+
+ ///
+ /// 成本中心
+ ///
+ public string CostId { get; set; }
+
+ ///
+ /// 工作地
+ ///
+ [SugarColumn(ColumnDescription = "工作地")]
+ public string Workplace { get; set; }
+
+ ///
+ /// 厂区
+ ///
+ [SugarColumn(ColumnDescription = "厂区")]
+ public string Factory { get; set; }
+
+ ///
+ /// 营业点
+ ///
+ [SugarColumn(ColumnDescription = "营业点")]
+ public Guid PlaceCode { get; set; }
+
+ ///
+ /// 餐次
+ ///
+ [SugarColumn(ColumnDescription = "餐次", IsNullable = true)]
+ public string ShiftType { get; set; }
+
+ ///
+ /// 菜品
+ ///
+ [SugarColumn(ColumnDescription = "菜品")]
+ public Guid DishesCode { get; set; }
+
+ ///
+ /// 手机号码
+ ///
+ [SugarColumn(ColumnDescription = "手机号码")]
+ public string Phone { get; set; }
+
+ ///
+ /// 用餐日期
+ ///
+ [SugarColumn(ColumnDescription = "用餐日期")]
+ public DateOnly SysDate { get; set; }
+
+ ///
+ /// 下单时间
+ ///
+ [SugarColumn(ColumnDescription = "下单时间")]
+ public DateTime CostDate { get; set; }
+
+ ///
+ /// 支付方式
+ ///
+ [SugarColumn(ColumnDescription = "支付方式", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
+ public CanteenPayEnumType PayType { get; set; }
+
+ ///
+ /// 订单状态
+ ///
+ [SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), ColumnDescription = "订单状态")]
+ public MiniProgramOrderStatusEnumType OrderStatus { get; set; }
+
+ ///
+ /// 总金额
+ ///
+ [SugarColumn(ColumnDescription = "总金额")]
+ public decimal TotalAmount { get; set; }
+ }
+}
diff --git a/Src/Dlhis.Entity/Canteen/Entities/OrderDetailsEntity.cs b/Src/Dlhis.Entity/Canteen/Entities/OrderDetailsEntity.cs
new file mode 100644
index 00000000..ecd2ab2a
--- /dev/null
+++ b/Src/Dlhis.Entity/Canteen/Entities/OrderDetailsEntity.cs
@@ -0,0 +1,79 @@
+using Dlhis.Entity.Canteen.Enums;
+using Kurisu.SqlSugar;
+using SqlSugar;
+using SqlSugar.DbConvert;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Dlhis.Entity.Canteen.Entities
+{
+ ///
+ /// 订餐明细表
+ ///
+ [SugarTable(TableName = "OrderDetails", TableDescription = "订餐明细表")]
+ public class OrderDetailsEntity : SugarBaseEntity
+ {
+ ///
+ /// 订单号
+ ///
+ [SugarColumn(ColumnDescription = "订单号")]
+ public string ThirdNo { get; set; }
+
+ ///
+ /// 营业日
+ ///
+ [SugarColumn(ColumnDescription = "营业日")]
+ public DateOnly BusinessDate { get; set; }
+
+ ///
+ /// 餐别
+ ///
+ [SugarColumn(ColumnDescription = "餐别")]
+ public string ShiftType { get; set; }
+
+ ///
+ /// 菜品编码
+ ///
+ [SugarColumn(ColumnDescription = "菜品编码")]
+ public Guid DishesCode { get; set; }
+
+ ///
+ /// 菜品名称
+ ///
+ [SugarColumn(ColumnDescription = "菜品名称")]
+ public Guid DishesName { get; set; }
+
+ ///
+ /// 单价
+ ///
+ [SugarColumn(ColumnDescription = "单价")]
+ public decimal Price { get; set; }
+
+ ///
+ /// 单位
+ ///
+ [SugarColumn(ColumnDescription = "单位")]
+ public string Unit { get; set; }
+
+ ///
+ /// 数量
+ ///
+ [SugarColumn(ColumnDescription = "数量")]
+ public int Num { get; set; }
+
+ ///
+ /// 金额
+ ///
+ [SugarColumn(ColumnDescription = "金额")]
+ public decimal Amount { get; set; }
+
+ ///
+ /// 订单明细状态
+ ///
+ [SugarColumn(ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert), ColumnDescription = "订单明细状态")]
+ public OrderDetailsStatusEnumType OrderStatus { get; set; }
+ }
+}
diff --git a/Src/Dlhis.Entity/Canteen/Enums/CanteenDishesEnumType.cs b/Src/Dlhis.Entity/Canteen/Enums/CanteenDishesEnumType.cs
new file mode 100644
index 00000000..dc3ba103
--- /dev/null
+++ b/Src/Dlhis.Entity/Canteen/Enums/CanteenDishesEnumType.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Dlhis.Entity.Canteen.Enums
+{
+ ///
+ /// 菜品类型
+ ///
+ [Description("菜品类型")]
+ public enum CanteenDishesEnumType
+ {
+
+ ///
+ /// 订餐
+ ///
+ [Description("订餐")]
+ Order = 1,
+
+ ///
+ /// 扫码点餐
+ ///
+ [Description("扫码点餐")]
+ QrCode=2,
+
+ ///
+ /// 通用
+ ///
+ [Description("通用")]
+ General = 3,
+ }
+}
diff --git a/Src/Dlhis.Entity/Canteen/Enums/CanteenPayEnumType.cs b/Src/Dlhis.Entity/Canteen/Enums/CanteenPayEnumType.cs
new file mode 100644
index 00000000..72218726
--- /dev/null
+++ b/Src/Dlhis.Entity/Canteen/Enums/CanteenPayEnumType.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Dlhis.Entity.Canteen.Enums
+{
+ ///
+ /// 支付方式
+ ///
+ [Description("支付方式")]
+ public enum CanteenPayEnumType
+ {
+ ///
+ /// 餐补
+ ///
+ [Description("餐补")]
+ Repair = 1,
+
+ ///
+ /// 现场
+ ///
+ [Description("现场")]
+ Scene = 2,
+ }
+}
diff --git a/Src/Dlhis.Entity/Canteen/Enums/MiniProgramOrderStatusEnumType.cs b/Src/Dlhis.Entity/Canteen/Enums/MiniProgramOrderStatusEnumType.cs
new file mode 100644
index 00000000..56eb9ba1
--- /dev/null
+++ b/Src/Dlhis.Entity/Canteen/Enums/MiniProgramOrderStatusEnumType.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Dlhis.Entity.Canteen.Enums
+{
+ public enum MiniProgramOrderStatusEnumType
+ {
+ ///
+ /// 有效
+ ///
+ [Description("有效")]
+ I = 1,
+
+ ///
+ /// 取消
+ ///
+ [Description("取消")]
+ C = 2,
+
+ ///
+ /// 退单
+ ///
+ [Description("退单")]
+ X = 3,
+
+ ///
+ /// 免单
+ ///
+ [Description("免单")]
+ Z = 4,
+ }
+}
diff --git a/Src/Dlhis.Entity/Canteen/Enums/OrderDetailsStatusEnumType.cs b/Src/Dlhis.Entity/Canteen/Enums/OrderDetailsStatusEnumType.cs
new file mode 100644
index 00000000..0012812e
--- /dev/null
+++ b/Src/Dlhis.Entity/Canteen/Enums/OrderDetailsStatusEnumType.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Dlhis.Entity.Canteen.Enums
+{
+ ///
+ /// 订单明细状态
+ ///
+ [Description("订单明细状态")]
+ public enum OrderDetailsStatusEnumType
+ {
+ ///
+ /// 有效
+ ///
+ [Description("有效")]
+ I = 1,
+ }
+}