1+ // -----------------------------------------------------------------------------
2+ // Filename: RoleEvent.cs
3+ //
4+ // Description: A model that represents an event produced by a MoneyMoov
5+ // Role execution.
6+ //
7+ // Author(s):
8+ // Axel Granillo ([email protected] ) 9+ //
10+ // History:
11+ // 18 07 2025 Axel Granillo Created, Remote, Mexico City, Mexico.
12+ //
13+ // License:
14+ // MIT.
15+ // -----------------------------------------------------------------------------
16+
17+ using NoFrixion . Common . Permissions ;
18+ using NoFrixion . MoneyMoov . Enums ;
19+
20+ namespace NoFrixion . MoneyMoov . Models ;
21+
22+ /// <summary>
23+ /// A model that represents an event produced by a MoneyMoov Role execution.
24+ /// </summary>
25+ public class RoleEvent
26+ {
27+ public Guid ID { get ; set ; }
28+
29+ public Guid RoleID { get ; set ; }
30+
31+ public string ? Notes { get ; set ; }
32+
33+ public RoleEventTypeEnum Type { get ; set ; }
34+
35+ public DateTimeOffset Inserted { get ; set ; }
36+
37+ public string ? AuthoriserHash { get ; set ; }
38+
39+ /// <summary>
40+ /// The name the role had at the time of the event.
41+ /// </summary>
42+ public string ? Name { get ; set ; }
43+
44+ /// <summary>
45+ /// The description the role had at the time of the event.
46+ /// </summary>
47+ public string ? Description { get ; set ; }
48+
49+ /// <summary>
50+ /// The merchant permissions the role had at the time of the event.
51+ /// </summary>
52+ public MerchantPermissions MerchantPermissions { get ; set ; }
53+
54+ /// <summary>
55+ /// The account permissions the role had at the time of the event.
56+ /// </summary>
57+ public AccountPermissions AccountPermissions { get ; set ; }
58+
59+ /// <summary>
60+ /// The client session timeout seconds the role had at the time of the event.
61+ /// </summary>
62+ public int ? ClientSessionTimeoutSeconds { get ; set ; }
63+
64+ /// <summary>
65+ /// For <see cref="RoleEventTypeEnum.AssignedToUser"/> and <see cref="RoleEventTypeEnum.RemovedFromUser"/> event types.
66+ /// The user that was assigned to or removed from the role at the time of the event.
67+ /// </summary>
68+ public Guid ? AssignationEventUserID { get ; set ; }
69+
70+ /// <summary>
71+ /// The number of users assigned to the role at the time of the event.
72+ /// </summary>
73+ public int ? AssignedUsers { get ; set ; }
74+
75+ /// <summary>
76+ /// IDs of the accounts that were assigned to the role-user during the event.
77+ /// </summary>
78+ public Guid [ ] ? AccountIDs { get ; set ; }
79+
80+ /// <summary>
81+ /// User that triggered the event.
82+ /// </summary>
83+ public User ? User { get ; set ; }
84+ }
0 commit comments