Add project files.

This commit is contained in:
Behzad Alizadeh
2025-07-02 16:25:46 +03:30
parent 7391bb6626
commit d58167d24a
137 changed files with 85333 additions and 0 deletions
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Elsa.Common.Models;
using JetBrains.Annotations;
namespace Caspian.WorkflowFramework.Models
{
[PublicAPI]
public class CreateAndExecuteWorkflowModel
{
/// <summary>
/// Workflow name
/// </summary>
[Required]
public string? Name { get; set; }
/// <summary>
/// Workflow version
/// </summary>
[Required]
public VersionOptions Version { get; set; }
/// <summary>
/// Current user's id
/// </summary>
[Required]
public long? UserId { get; set; }
}
}
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Caspian.WorkflowFramework.Models
{
public class InquiryStateModel
{
[Required]
public string WorkflowInstanceId { get; set; }
}
}
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JetBrains.Annotations;
namespace Caspian.WorkflowFramework.Models
{
[PublicAPI]
public class PublishEventModel
{
[Required]
public string WorkflowInstanceId { get; set; }
[Required]
public string EventName { get; set; }
[Required]
public string? EventData { get; set; }
}
}
@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JetBrains.Annotations;
namespace Caspian.WorkflowFramework.Models
{
[PublicAPI]
public class WorkflowModel
{
/// <summary>
/// شناسه گردش کار
/// </summary>
public string? InstanceId { get; set; }
/// <summary>
/// نام گردش کار
/// </summary>
public string? Name { get; set; }
/// <summary>
/// اتمام گردش کار؟
/// </summary>
public bool IsComplete { get; set; }
/// <summary>
/// برای کدام کاربر؟
/// </summary>
public long? UserId { get; set; }
/// <summary>
/// داده صفحه جاری
/// </summary>
public string? CurrentPageData { get; set; }
/// <summary>
/// داده صفحه بعد
/// <remark>
/// فعلا استفاده ای نداریم
/// </remark>
/// </summary>
public string? NextPageData { get; set; }
/// <summary>
/// آدرس صفحه بعدی
/// </summary>
public string? NextPageUrl { get; set; }
/// <summary>
/// رویدادی که باید پس از سابمیت صفحه بعدی منتشر شود
/// </summary>
public string? NextPageEventName { get; set; }
}
}
@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JetBrains.Annotations;
namespace Caspian.WorkflowFramework.Models
{
[PublicAPI]
public class WorkflowResponse<T> : WorkflowResponseBase where T : class, new()
{
public WorkflowResponse()
{
Data = new T();
}
/// <summary>
/// پاسخ
/// </summary>
public T? Data { get; set; }
}
[PublicAPI]
public class WorkflowResponseBase
{
/// <summary>
/// وضعیت پاسخ
/// </summary>
public int? Status { get; set; }
/// <summary>
/// پیام پاسخ
/// </summary>
public string? Message { get; set; }
}
}