WIP
This commit is contained in:
@ -1,3 +1,6 @@
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
public class DataModel
|
||||
@ -7,8 +10,15 @@ namespace Model
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public DataModel()
|
||||
{
|
||||
this.id = ObjectId.GenerateNewId().ToString();
|
||||
}
|
||||
|
||||
[BsonId]
|
||||
public string id { get; set; }
|
||||
|
||||
[BsonElement("message")]
|
||||
public string? message { get; set; }
|
||||
}
|
||||
}
|
@ -8,6 +8,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Confluent.Kafka" Version="2.4.0" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="2.26.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
Reference in New Issue
Block a user