add: 师傅实体和服务类型
This commit is contained in:
		| @ -56,6 +56,8 @@ public class AdminDbContext : | ||||
|  | ||||
|     #region 订单 | ||||
|     public DbSet<Order> Order { get; set; } | ||||
|     public DbSet<Worker> Worker { get; set; } | ||||
|     public DbSet<ServiceCategory> ServiceCategory { get; set; } | ||||
|     #endregion | ||||
|  | ||||
|     public AdminDbContext(DbContextOptions<AdminDbContext> options) | ||||
|  | ||||
| @ -18,7 +18,7 @@ namespace KonSoft.Admin.EntityFrameworkCore.Configures | ||||
|  | ||||
|             builder.Entity<Order>(b => | ||||
|             { | ||||
|                 b.ToTable(AdminConsts.DbTablePrefix + "Order" + AdminConsts.DbSchema); | ||||
|                 b.ToTable(AdminConsts.DbTablePrefix + nameof(Order) + AdminConsts.DbSchema); | ||||
|  | ||||
|                 b.OwnsOne(o => o.Address, a => | ||||
|                 { | ||||
| @ -30,6 +30,21 @@ namespace KonSoft.Admin.EntityFrameworkCore.Configures | ||||
|                 }); | ||||
|             }); | ||||
|  | ||||
|             builder.Entity<Worker>(b => | ||||
|             { | ||||
|                 b.ToTable(AdminConsts.DbTablePrefix + nameof(Worker) + AdminConsts.DbSchema); | ||||
|  | ||||
|  | ||||
|             }); | ||||
|  | ||||
|  | ||||
|             builder.Entity<ServiceCategory>(b => | ||||
|             { | ||||
|                 b.ToTable(AdminConsts.DbTablePrefix + nameof(ServiceCategory) + AdminConsts.DbSchema); | ||||
|  | ||||
|  | ||||
|             }); | ||||
|  | ||||
|         } | ||||
|  | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 于鹏
					于鹏