using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FLY.OBJComponents.Server.Model;
using SQLite;

namespace FLY.Thick.FilmCasting.Server.Model
{
    /// <summary>
    /// 数据库对象
    /// </summary>
    public class DbModel : SQLite.SQLiteDbContext, IErrorDBModel
    {
        /// <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>
        /// Sample表 对象
        /// </summary>
        public DBTable<Db_Sample> TbSample { get; } = new DBTable<Db_Sample>();

        /// <summary>
        /// TrendData表 对象
        /// </summary>
        public DBTable<Db_Error> TbError { get; } = new DBTable<Db_Error>();

        /// <summary>
        /// 
        /// </summary>
        /// <param name="dbpath">sqlite数据库路径</param>
        public DbModel(string dbpath) : base(dbpath)
        {

        }
        /// <summary>
        /// 
        /// </summary>
        public DbModel() : this(@"D:\film_casting_data\thickness.sqlite3")
        {

        }
    }
}
