using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Domain.Entities.Developers; /// /// 앱이 요청한 scope 목록 (read:profile, read:donations, write:notes 등). /// public class ApiApplicationScope { [ForeignKey(nameof(ApplicationID))] public virtual ApiApplication? Application { get; private set; } [Key] public int ID { get; private set; } public int ApplicationID { get; private set; } public string Scope { get; private set; } = default!; public DateTime CreatedAt { get; private set; } = DateTime.UtcNow; private ApiApplicationScope() { } public static ApiApplicationScope Create(int applicationID, string scope) { return new ApiApplicationScope { ApplicationID = applicationID, Scope = scope }; } }