using SqlSugar;
using WmsMobileServe.Annotation;

namespace WmsMobileServe.DataBase.Base;

/// <summary>
/// 基础数据库操作类
/// </summary>
[Component]
public class DataBaseClient
{

    private static SqlSugarScope? _instance;

    public SqlSugarScope Instance()
    {
        _instance ??= new SqlSugarScope(new ConnectionConfig()
            {
                IsAutoCloseConnection = true,
                ConfigId = "0",
                DbType = DbType.Oracle,
                ConnectionString = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.63.179)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=OMS)));User Id=WMS_RF;Password=Q12.U.<r15;",
            });
        return _instance;
    }
}
