29 lines
605 B
C#
29 lines
605 B
C#
using MongoDB.Bson.Serialization.Attributes;
|
|
using System;
|
|
|
|
namespace EnVisage.MongoDbMigration.Data
|
|
{
|
|
[BsonIgnoreExtraElements]
|
|
[Serializable]
|
|
public class Migration
|
|
{
|
|
[BsonId]
|
|
public Version Version { get; set; }
|
|
|
|
private DateTime? _created = null;
|
|
public DateTime Created
|
|
{
|
|
get
|
|
{
|
|
if (!_created.HasValue)
|
|
_created = DateTime.UtcNow;
|
|
|
|
return _created.Value;
|
|
}
|
|
set
|
|
{
|
|
_created = value;
|
|
}
|
|
}
|
|
}
|
|
} |