forked from LeanKit/LeanKit.API.Client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCardModel.csx
More file actions
34 lines (30 loc) · 1.08 KB
/
CardModel.csx
File metadata and controls
34 lines (30 loc) · 1.08 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
//------------------------------------------------------------------------------
// <copyright company="LeanKit Inc.">
// Copyright (c) LeanKit Inc. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
// Modify CardModel and CardViewToCardModel to export more or less fields
using LeanKit.API.Client.Library.TransferObjects;
public class CardModel {
public long CardId { get; set; }
public long LaneId { get; set; }
public string LaneTitle { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public string Type { get; set; }
public string Priority { get; set; }
public int Size { get; set; }
}
public CardModel CardViewToCardModel(Lane lane, CardView card) {
var model = new CardModel {
CardId = card.Id,
LaneId = card.LaneId,
LaneTitle = lane.Title.Replace("\"", "\"\""),
Title = card.Title.Replace("\"", "\"\""),
Description = card.Description.Replace("\"", "\"\""),
Type = card.TypeName,
Priority = card.Priority.ToString(),
Size = card.Size
};
return model;
}