添加项目文件。
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
using Common.CommonModel;
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoRepository;
|
||||
using MongoRepository.Attributes;
|
||||
using MongoRepository.Config;
|
||||
|
||||
namespace Domain.Admin.Admin
|
||||
{
|
||||
[BsonCollection("system_user", ServiceDatabases.Admin)]
|
||||
[BsonIgnoreExtraElements]
|
||||
public class SystemUser:MongoBaseEntity
|
||||
{
|
||||
[BsonElement("username")]
|
||||
public string? UserName { get; set; }
|
||||
|
||||
|
||||
[BsonElement("displayname")]
|
||||
public string? DisplayName { get; set; }
|
||||
|
||||
[BsonElement("icon")]
|
||||
public string? Icon { get; set; }
|
||||
|
||||
[BsonElement("password")]
|
||||
public string? Password { get; set; }
|
||||
|
||||
|
||||
[BsonElement("registertime")]
|
||||
[BsonDateTimeOptions(Kind = DateTimeKind.Local, DateOnly = false)]
|
||||
public DateTime RegisterTime { get; set; } = DateTime.Now;
|
||||
|
||||
[BsonElement("state")]
|
||||
public int State { get; set; } = 1;
|
||||
|
||||
[BsonElement("systemrole")]
|
||||
public BaseIdName SystemRole { get; set; }
|
||||
|
||||
|
||||
public void Init()
|
||||
{
|
||||
Id = ObjectId.GenerateNewId().ToString();
|
||||
State = 1;
|
||||
RegisterTime=DateTime.Now;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user