using MadRunFabric.Common.Helpers;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.Text;

namespace MadRunFabric.Common
{
    /// <summary>
    /// 所有数据表实体类都必须实现此接口 关系型数据库
    /// </summary>
    /// <typeparam name="TKey"></typeparam>
    public interface IBaseDbModel
    {

    }

    public abstract class BaseDbModel<TKey> : IBaseDbModel
    {
        public abstract TKey Id { get; set; }

        public virtual string UniqueId { get; set; } = CommonHelper.NewMongodbId().ToString();
    }
}
