12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- using Expressive;
- using InABox.Clients;
- using InABox.Core;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading;
- namespace Comal.Classes
- {
- public enum EventType
- {
- AfterSave,
- Scheduled
- }
- public class Event : Entity, IRemotable, IPersistent, ILicense<CoreLicense>
- {
- [UniqueCodeEditor]
- [EditorSequence(1)]
- public string Code { get; set; } = "";
- [TextBoxEditor]
- [EditorSequence(2)]
- public string Description { get; set; } = "";
- [EditorSequence(3)]
- public EventType EventType { get; set; }
- /// <summary>
- /// Serialised event data.
- /// </summary>
- [NullEditor]
- public string Data { get; set; } = "";
- [EditorSequence(4)]
- [ExpressionEditor(null)]
- public string NotificationExpression { get; set; } = "";
- [Comment("Sets whether notifications are automatically sent when the event triggers. If false, the notifications must be manually sent by the event actions.")]
- [EditorSequence(5)]
- public bool NotificationsEnabled { get; set; } = true;
- [EditorSequence(6)]
- public bool Enabled { get; set; } = true;
- [Comment("Marks whether non-managers (users without the CanManageEvents security token) can view this event.")]
- [EditorSequence(7)]
- public bool Visible { get; set; } = true;
- static Event()
- {
- DefaultColumns.Add<Event>(x => x.Code);
- DefaultColumns.Add<Event>(x => x.Description);
- DefaultColumns.Add<Event>(x => x.EventType);
- }
- }
- public class EventLink : EntityLink<Event>
- {
- [CodePopupEditor(typeof(Event))]
- public override Guid ID { get; set; }
- public string Code { get; set; }
- public string Description { get; set; }
- }
- }
|