2025-07-04 08:36:36 +08:00
|
|
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
|
|
|
using MongoDB.Bson;
|
|
|
|
|
using System;
|
2025-05-05 11:34:24 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
2025-05-11 14:19:01 +08:00
|
|
|
|
namespace SqlSugar.MongoDb
|
2025-05-05 11:34:24 +08:00
|
|
|
|
{
|
|
|
|
|
public class MongoDbBase
|
|
|
|
|
{
|
2025-07-04 08:36:36 +08:00
|
|
|
|
[BsonRepresentation(BsonType.ObjectId)]
|
2025-05-05 11:34:24 +08:00
|
|
|
|
[SugarColumn(IsPrimaryKey =true,IsOnlyIgnoreInsert =true,ColumnName ="_id")]
|
|
|
|
|
public string Id { get; set; }
|
|
|
|
|
}
|
2025-07-18 14:14:45 +08:00
|
|
|
|
public class MongoDbBaseLong
|
|
|
|
|
{
|
|
|
|
|
[SqlSugar.SugarColumn(IsPrimaryKey = true, ColumnName = "_id")]
|
|
|
|
|
public long Id { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class MongoDbBaseString
|
|
|
|
|
{
|
|
|
|
|
[SqlSugar.SugarColumn(IsPrimaryKey = true, ColumnName = "_id")]
|
|
|
|
|
public string Id { get; set; }
|
|
|
|
|
}
|
|
|
|
|
public class MongoDbBaseGuid
|
|
|
|
|
{
|
|
|
|
|
[SqlSugar.SugarColumn(IsPrimaryKey = true, ColumnName = "_id")]
|
|
|
|
|
public Guid Id { get; set; }
|
|
|
|
|
}
|
2025-05-05 11:34:24 +08:00
|
|
|
|
}
|