upd:新增了家政用户实体,并添加了仓储,修改了之前的文件名字和db上下文里面的命名
This commit is contained in:
@ -55,9 +55,9 @@ public class AdminDbContext :
|
||||
#endregion
|
||||
|
||||
#region 订单
|
||||
public DbSet<Order> Order { get; set; }
|
||||
public DbSet<Worker> Worker { get; set; }
|
||||
public DbSet<ServiceCategory> ServiceCategory { get; set; }
|
||||
public DbSet<Order> Orders { get; set; }
|
||||
public DbSet<Worker> Workers { get; set; }
|
||||
public DbSet<ServiceCategory> ServiceCategorys { get; set; }
|
||||
#endregion
|
||||
|
||||
public AdminDbContext(DbContextOptions<AdminDbContext> options)
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Volo.Abp.Identity;
|
||||
|
||||
namespace KonSoft.TenantManagement.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// 家政服务工人实体
|
||||
/// </summary>
|
||||
public class HouseholdWorker:IdentityUser
|
||||
{
|
||||
/// <summary>
|
||||
/// 接单数
|
||||
/// </summary>
|
||||
public int OrderCount { get; set; }
|
||||
/// <summary>
|
||||
/// 职业
|
||||
/// </summary>
|
||||
public required string Profession { get; set; }
|
||||
/// <summary>
|
||||
/// 能力范围
|
||||
/// </summary>
|
||||
public required string ScopeOfCompetence { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using KonSoft.TenantManagement.Entities;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
|
||||
namespace KonSoft.TenantManagement.IRepositories
|
||||
{
|
||||
public interface IHouseholdWorkerRepository: EfCoreRepository<AdminDbContext, Order>, IRepository<HouseholdWorker>
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
using KonSoft.TenantManagement.Entities;
|
||||
using KonSoft.TenantManagement.IRepositories;
|
||||
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
|
||||
using Volo.Abp.EntityFrameworkCore;
|
||||
|
||||
namespace KonSoft.TenantManagement.EntityFrameworkCore.Repositories
|
||||
{
|
||||
public class HouseholdWorkerRepository: EfCoreRepository<TenantManagementDbContext,HouseholdWorker>,IHouseholdWorkerRepository
|
||||
{
|
||||
public HouseholdWorkerRepository(IDbContextProvider<TenantManagementDbContext> dbContextProvider) : base(dbContextProvider)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using KonSoft.TenantManagement.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Volo.Abp.AuditLogging.EntityFrameworkCore;
|
||||
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
|
||||
using Volo.Abp.Data;
|
||||
@ -52,7 +53,7 @@ public class TenantManagementDbContext :
|
||||
public DbSet<TenantConnectionString> TenantConnectionStrings { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
public DbSet<HouseholdWorker> HouseholdWorkers { get; set; }
|
||||
public TenantManagementDbContext(DbContextOptions<TenantManagementDbContext> options)
|
||||
: base(options)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user