2023-04-07 17:55:41 +04:00
|
|
|
|
using CaseAccountingDataBaseImplement.Models;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace CaseAccountingDataBaseImplement
|
|
|
|
|
{
|
|
|
|
|
public class CaseAccountingDatabase : DbContext
|
|
|
|
|
{
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
if (optionsBuilder.IsConfigured == false)
|
|
|
|
|
{
|
|
|
|
|
optionsBuilder.UseNpgsql(@"
|
|
|
|
|
Host=localhost;
|
|
|
|
|
Port=5432;
|
|
|
|
|
Database=CaseAccountingDatabase;
|
2023-05-19 14:39:49 +04:00
|
|
|
|
Username=courseuser;
|
|
|
|
|
Password=courseuser");
|
2023-04-07 17:55:41 +04:00
|
|
|
|
}
|
|
|
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<Case> Cases { set; get; }
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<User> Users { set; get; }
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<Contract> Contracts { set; get; }
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<Deal> Deals { set; get; }
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<CaseDeal> CaseDeals { set; get; }
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<CaseLawyer> CaseLawyers { set; get; }
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<DealContract> DealContracts { set; get; }
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<Hearing> Hearings { set; get; }
|
|
|
|
|
|
|
|
|
|
public virtual DbSet<Lawyer> Lawyers { set; get; }
|
|
|
|
|
|
2023-04-08 22:40:14 +04:00
|
|
|
|
public virtual DbSet<LawyerContract> LawyerContracts { set; get; }
|
2023-04-07 17:55:41 +04:00
|
|
|
|
|
|
|
|
|
public virtual DbSet<Specialization> Specializations { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|