ACSDbContext.cs 2.43 KB
using Infrastructure;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using System.Data.SqlClient;

namespace WebRepository
{
    public partial class ACSDbContext : DbContext
    {
        public ACSDbContext(DbContextOptions<ACSDbContext> options) : base(options)
        {
        }

        #region ProjectDB

        public virtual DbSet<Map> Maps { get; set; }
        public virtual DbSet<MapPageContent> Map_content_tabs { get; set; }
        public virtual DbSet<MapPoint> MapPoints { get; set; }
        public virtual DbSet<MapStation> MapStations { get; set; }
        public virtual DbSet<MapRegion> MapRegions { get; set; }


        public virtual DbSet<TBaseAgv> TBaseAgvs { get; set; }
        public virtual DbSet<TBaseAgvCharge> TBaseAgvCharges { get; set; }
        public virtual DbSet<TBaseAgvmileage> TBaseAgvmileages { get; set; }
        public virtual DbSet<TBaseAgvState> TBaseAgvStates { get; set; }
        public virtual DbSet<TBasePathPoint> TBasePathPoints { get; set; }
        public virtual DbSet<TBasePoint> TBasePoints { get; set; }
        public virtual DbSet<TBaseStation> TBaseStations { get; set; }
        public virtual DbSet<TConfigAgvErrTable> TConfigAgvErrTables { get; set; }
        public virtual DbSet<TConfigErrMsg> TConfigErrMsgs { get; set; }
        public virtual DbSet<TConfigKeyValue> TConfigKeyValues { get; set; }
        public virtual DbSet<TConfigPoint> TConfigPoints { get; set; }
        public virtual DbSet<TConfigTaskSplit> TConfigTaskSplits { get; set; }
        public virtual DbSet<TConfigTim> TConfigTims { get; set; }
        public virtual DbSet<TSonTask> TSonTasks { get; set; }
        public virtual DbSet<TSonTaskRecord> TSonTaskRecords { get; set; }
        public virtual DbSet<TTask> TTasks { get; set; }
        public virtual DbSet<TTaskRecord> TTaskRecords { get; set; }
        public virtual DbSet<TBaseNumber> TBaseNumbers { get; set; }
        public virtual DbSet<TBaseHoister> TBaseHoisters { get; set; }
        #endregion

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            // [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
            #region ProjectDB
            modelBuilder.Entity<TBaseAgv>().Property(c => c.CurrentCharge).HasColumnType("numeric(10, 2)");
            modelBuilder.Entity<TBaseAgv>().Property(c => c.StartCharges).HasColumnType("numeric(10, 2)");
            #endregion

        }
    }
}