Files
raven/server/AyaNova/models/WorkOrderItemTask.cs
2021-05-24 20:04:32 +00:00

55 lines
1.8 KiB
C#

using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
public class WorkOrderItemTask : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
//public int DisplayOrder { get; set; } = 0;
public int Sequence { get; set; }
[Required]
public string Task { get; set; }
[Required]
public WorkorderItemTaskCompletionType Status { get; set; } = WorkorderItemTaskCompletionType.Incomplete;
[NotMapped]
public string StatusViz { get; set; }
public long? CompletedByUserId { get; set; }
[NotMapped]
public string CompletedByUserViz { get; set; }
public DateTime? CompletedDate { get; set; }
//UTILITY FIELDS
[NotMapped]
public bool IsDirty { get; set; } = false;//never dirty coming from the server
[Required]
public long WorkOrderItemId { get; set; }
[JsonIgnore]
public WorkOrderItem WorkOrderItem { get; set; }
[NotMapped, JsonIgnore]
public AyaType AyaType { get => AyaType.WorkOrderItemTask; }
}//eoc
}//eons
/*
CREATE TABLE [dbo].[AWORKORDERITEMTASK](
[AID] [uniqueidentifier] NOT NULL,
[AWORKORDERITEMID] [uniqueidentifier] NOT NULL,
[ATASKID] [uniqueidentifier] NOT NULL,//drop, feeds now, Task it linked to is literally just a single string "Name" so this is an easy decision
[ATASKGROUPID] [uniqueidentifier] NOT NULL,//drop feeds now
[ACREATOR] [uniqueidentifier] NOT NULL,
[AMODIFIER] [uniqueidentifier] NOT NULL,
[ACREATED] [datetime] NOT NULL,
[AMODIFIED] [datetime] NOT NULL,
[AWORKORDERITEMTASKCMPLTNTYPE] [smallint] NOT NULL//rename to Status
*/