123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- using System;
- using System.Collections.Generic;
- using InABox.Core;
- namespace Comal.Classes
- {
- public class JobRetentionType : Entity, IRemotable, IPersistent, ILicense<ProjectManagementLicense>, ISequenceable
- {
- [TextBoxEditor]
- [EditorSequence(1)]
- public string Description { get; set; }
- [DoubleEditor]
- [EditorSequence(2)]
- public double Rate { get; set; }
- [DoubleEditor]
- [EditorSequence(3)]
- public double Maximum { get; set; }
- [DoubleEditor]
- [EditorSequence(4)]
- public double Completion { get; set; }
- [IntegerEditor]
- [EditorSequence(5)]
- public int Release { get; set; }
-
- [CheckBoxEditor]
- [EditorSequence(6)]
- public bool IncludeVariations { get; set; }
- [NullEditor]
- public long Sequence { get; set; }
- }
- public class JobRetentionTypeLink : EntityLink<JobRetentionType>
- {
- [LookupEditor(typeof(JobRetentionType))]
- public override Guid ID { get; set; }
- [TextBoxEditor(Visible = Visible.Optional, Editable = Editable.Hidden)]
- [EditorSequence(1)]
- public string Description { get; set; }
- [DoubleEditor(Visible = Visible.Hidden, Editable = Editable.Hidden)]
- [EditorSequence(2)]
- public double Rate { get; set; }
- [DoubleEditor(Visible = Visible.Hidden, Editable = Editable.Hidden)]
- [EditorSequence(3)]
- public double Maximum { get; set; }
- [DoubleEditor(Visible = Visible.Hidden, Editable = Editable.Hidden)]
- [EditorSequence(4)]
- public double Completion { get; set; }
- [IntegerEditor(Visible = Visible.Hidden, Editable = Editable.Hidden)]
- [EditorSequence(5)]
- public int Release { get; set; }
-
- [CheckBoxEditor(Visible = Visible.Hidden, Editable = Editable.Hidden)]
- [EditorSequence(6)]
- public bool IncludeVariations { get; set; }
- }
- public class JobRetentionTypeLookups : ILookupDefinition<JobRetentionType>
- {
- public SortOrder<JobRetentionType>? DefineSortOrder()
- {
- return new SortOrder<JobRetentionType>(x => x.Sequence);
- }
- public Filter<JobRetentionType>? DefineFilter()
- {
- return null;
- }
- public Columns<JobRetentionType> DefineColumns()
- {
- return Columns.All<JobRetentionType>();
- }
- public Columns<JobRetentionType> RequiredColumns()
- {
- return Columns.All<JobRetentionType>();
- }
- public string FormatLookup(Dictionary<string, object?> values, IEnumerable<string> exclude)
- {
- return $"{values["Description"]}";
- }
- }
- public class JobRetention : EnclosedEntity
- {
- [EditorSequence(1)] public JobRetentionTypeLink Type { get; set; }
- [DoubleEditor]
- [EditorSequence(2)]
- public double Rate { get; set; }
- [DoubleEditor]
- [EditorSequence(3)]
- public double Maximum { get; set; }
- [DoubleEditor]
- [EditorSequence(4)]
- public double Completion { get; set; }
- [IntegerEditor]
- [EditorSequence(5)]
- public int Release { get; set; }
-
- [CheckBoxEditor]
- [EditorSequence(6)]
- public bool IncludeVariations { get; set; }
- static JobRetention()
- {
- LinkedProperties.Register<JobRetention, JobRetentionTypeLink, double>(x => x.Type, x => x.Rate, x => x.Rate);
- LinkedProperties.Register<JobRetention, JobRetentionTypeLink, double>(x => x.Type, x => x.Maximum, x => x.Maximum);
- LinkedProperties.Register<JobRetention, JobRetentionTypeLink, double>(x => x.Type, x => x.Completion, x => x.Completion);
- LinkedProperties.Register<JobRetention, JobRetentionTypeLink, int>(x => x.Type, x => x.Release, x => x.Release);
- LinkedProperties.Register<JobRetention, JobRetentionTypeLink, bool>(x => x.Type, x => x.IncludeVariations, x => x.IncludeVariations);
- }
- }
- }
|