Repository navigation
Expand file tree
/
Copy pathCardView.cs
More file actions
100 lines (92 loc) · 3.51 KB
/
Copy pathCardView.cs
File metadata and controls
100 lines (92 loc) · 3.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
//------------------------------------------------------------------------------
// <copyright company="LeanKit Inc.">
// Copyright (c) LeanKit Inc. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace LeanKit.API.Client.Library.TransferObjects
{
[DebuggerDisplay("{GetType().Name,nq} [{Id}] {Title}")]
public class CardView
{
public virtual string SystemType { get; set; }
public virtual long Id { get; set; }
public virtual long LaneId { get; set; }
public virtual string Title { get; set; }
public virtual string Description { get; set; }
public virtual CardType Type { get; set; }
public virtual long TypeId { get; set; }
public virtual PriorityType Priority { get; set; }
public virtual string PriorityText
{
get { return Priority.ToString(); }
}
public virtual string TypeName { get; set; }
public virtual string TypeIconPath { get; set; }
public virtual string TypeColorHex { get; set; }
public virtual int Size { get; set; }
public virtual bool Active { get; set; }
public virtual string Color { get; set; }
public virtual long Version { get; set; }
public virtual List<AssignedUserInfo> AssignedUsers { get; set; }
public virtual bool IsBlocked { get; set; }
public virtual string BlockReason { get; set; }
public virtual int Index { get; set; }
public virtual string StartDate { get; set; }
public virtual string DueDate { get; set; }
public virtual string ExternalSystemName { get; set; }
public virtual string ExternalSystemUrl { get; set; }
public virtual string ExternalCardID { get; set; }
public virtual string Tags { get; set; }
public virtual long? ClassOfServiceId { get; set; }
public virtual string ClassOfServiceTitle { get; set; }
public virtual string ClassOfServiceIconPath { get; set; }
public virtual string ClassOfServiceColorHex { get; set; }
public virtual int CountOfOldCards { get; set; }
public virtual string LastMove { get; set; }
public virtual string LastActivity { get; set; }
public virtual string DateArchived { get; set; }
public virtual string LastComment { get; set; }
public virtual int CommentsCount { get; set; }
public List<Comment> Comments { get; set; }
public List<CardEvent> HistoryEvents { get; set; }
public int? ParentCardId { get; set; }
public int? ParentBoardId { get; set; }
public Card ToCard()
{
var card = new Card();
card.Active = Active;
card.ClassOfServiceId = ClassOfServiceId;
card.BlockReason = BlockReason;
card.Description = Description;
card.StartDate = StartDate;
card.DueDate = DueDate;
card.ExternalCardID = ExternalCardID;
card.ExternalSystemName = ExternalSystemName;
card.ExternalSystemUrl = ExternalSystemUrl;
card.Id = Id;
card.Index = Index;
card.IsBlocked = IsBlocked;
card.LaneId = LaneId;
card.Priority = (int) Priority;
card.Size = Size;
card.Tags = Tags;
card.Title = Title;
card.TypeId = TypeId;
card.Version = Version;
card.AssignedUserIds = (AssignedUsers != null) ? AssignedUsers.Select(x => x.AssignedUserId).ToArray() : null;
card.Comments = Comments;
card.HistoryEvents = HistoryEvents;
card.HistoryEvents = HistoryEvents;
card.LastMove = LastMove;
card.LastActivity = LastActivity;
card.LastComment = LastComment;
card.DateArchived = DateArchived;
card.ParentCardId = ParentCardId;
card.ParentBoardId = ParentBoardId;
return card;
}
}
}