| 123456789101112131415161718192021222324252627282930313233 |
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.DataAnnotations.Schema;
- namespace Domain.Entities.Developers;
- /// <summary>
- /// 앱이 요청한 scope 목록 (read:profile, read:donations, write:notes 등).
- /// </summary>
- 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
- };
- }
- }
|