DBModel.cs 1.46 KB
Newer Older
1 2
using FLY.OBJComponents.Server.Model;
using SQLite;
3 4 5 6 7 8 9 10
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FLY.Thick.Blowing.Server.Model
{
潘栩锋's avatar
潘栩锋 committed
11 12 13 14
    /// <summary>
    /// 数据库对象
    /// </summary>
    public class DbModel:SQLiteDbContext,IErrorDBModel
15
    {
潘栩锋's avatar
潘栩锋 committed
16 17 18 19 20 21 22 23 24 25 26 27
        /// <summary>
        /// Profile表 对象
        /// </summary>
        public DBTable<Db_Profile> TbProfile { get; } = new DBTable<Db_Profile>();
        /// <summary>
        /// ScanData表 对象
        /// </summary>
        public DBTable<Db_ScanData> TbScanData { get; } = new DBTable<Db_ScanData>();
        /// <summary>
        /// TrendData表 对象
        /// </summary>
        public DBTable<Db_TrendData> TbTrendData { get; } = new DBTable<Db_TrendData>();
28 29 30 31 32 33

        /// <summary>
        /// Sample表 对象
        /// </summary>
        public DBTable<Db_Sample> TbSample { get; } = new DBTable<Db_Sample>();

潘栩锋's avatar
潘栩锋 committed
34 35 36
        /// <summary>
        /// TrendData表 对象
        /// </summary>
37 38
        public DBTable<DB_Error> TbError { get; } = new DBTable<DB_Error>();

潘栩锋's avatar
潘栩锋 committed
39 40 41 42 43
        /// <summary>
        /// 
        /// </summary>
        /// <param name="dbpath">sqlite数据库路径</param>
        public DbModel(string dbpath) : base(dbpath)
44
        {
潘栩锋's avatar
潘栩锋 committed
45
            
46
        }
潘栩锋's avatar
潘栩锋 committed
47 48 49
        /// <summary>
        /// 
        /// </summary>
50
        public DbModel() : this(@"D:\blowingdata\thickness.sqlite3")
51 52 53 54 55
        {

        }
    }
}