File tree Expand file tree Collapse file tree 4 files changed +15
-1
lines changed
Expand file tree Collapse file tree 4 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1- using BackendFramework . Models ;
1+ using System ;
2+ using BackendFramework . Models ;
23using NUnit . Framework ;
34
45namespace Backend . Tests . Models
@@ -12,6 +13,7 @@ public void TestClone()
1213 {
1314 Id = "ProjectId" ,
1415 Name = "ProjectName" ,
16+ Created = DateTime . UtcNow ,
1517 IsActive = true ,
1618 LiftImported = true ,
1719 DefinitionsEnabled = true ,
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ public class Project
1919 [ BsonElement ( "name" ) ]
2020 public string Name { get ; set ; }
2121
22+ [ BsonElement ( "created" ) ]
23+ public DateTime ? Created { get ; set ; }
24+
2225 [ Required ]
2326 [ BsonElement ( "isActive" ) ]
2427 public bool IsActive { get ; set ; }
@@ -120,6 +123,7 @@ public Project Clone()
120123 {
121124 Id = Id ,
122125 Name = Name ,
126+ Created = Created ,
123127 IsActive = IsActive ,
124128 LiftImported = LiftImported ,
125129 DefinitionsEnabled = DefinitionsEnabled ,
Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ public async Task<bool> DeleteAllProjects()
6969 return null ;
7070 }
7171
72+ project . Created = DateTime . UtcNow ;
73+
7274 await _projects . InsertOneAsync ( project ) ;
7375 return project ;
7476 }
Original file line number Diff line number Diff line change @@ -35,6 +35,12 @@ export interface Project {
3535 * @memberof Project
3636 */
3737 name : string ;
38+ /**
39+ *
40+ * @type {string }
41+ * @memberof Project
42+ */
43+ created ?: string | null ;
3844 /**
3945 *
4046 * @type {boolean }
You can’t perform that action at this time.
0 commit comments