♻️ Extract the Storage service to DysonNetwork.Drive microservice

This commit is contained in:
2025-07-06 17:29:26 +08:00
parent 6a3d04af3d
commit 14b79f16f4
71 changed files with 2629 additions and 346 deletions

View 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;
}
}