♻️ Extract the Storage service to DysonNetwork.Drive microservice
This commit is contained in:
39
DysonNetwork.Drive/Models/Account.cs
Normal file
39
DysonNetwork.Drive/Models/Account.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DysonNetwork.Drive.Models;
|
||||
|
||||
public class Account : ModelBase
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
||||
[Required]
|
||||
[MaxLength(256)]
|
||||
public string Username { get; set; } = null!;
|
||||
|
||||
[Required]
|
||||
[MaxLength(256)]
|
||||
public string Email { get; set; } = null!;
|
||||
|
||||
[MaxLength(1024)]
|
||||
public string? DisplayName { get; set; }
|
||||
|
||||
public bool IsActive { get; set; } = true;
|
||||
public bool IsVerified { get; set; } = false;
|
||||
|
||||
// Navigation properties
|
||||
public virtual ICollection<CloudFile> Files { get; set; } = new List<CloudFile>();
|
||||
|
||||
// Timestamps
|
||||
public DateTimeOffset? LastLoginAt { get; set; }
|
||||
|
||||
// Methods
|
||||
public bool HasPermission(Permission permission)
|
||||
{
|
||||
// TODO: Implement actual permission checking logic
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user