-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathFounderProject.cs
More file actions
45 lines (35 loc) · 1.37 KB
/
FounderProject.cs
File metadata and controls
45 lines (35 loc) · 1.37 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
using Angor.Shared.Models;
namespace Angor.Client.Models;
public class FounderProject : Project
{
public int ProjectIndex { get; set; }
public DateTime? LastRequestForSignaturesTime { get; set; }
public string ProjectInfoEventId { get; set; }
public bool NostrProfileCreated { get; set; }
/// <summary>
/// The total amount of the project that has been invested in,
/// This parameter will only be set once the founder went to the spend page
/// and was able to calaulate to total amount of funds that have been invested in the project.
///
/// The intention is to use this parameter to know if the founder should be forced to release
/// the funds back to the investor by sending signature of a trx that spend coins to the investors address
/// </summary>
public decimal? TotalAvailableInvestedAmount { get; set; }
public DateTime? ReleaseSignaturesTime { get; set; }
public bool TargetInvestmentReached()
{
return TotalAvailableInvestedAmount >= ProjectInfo.TargetAmount;
}
public bool ProjectDateStarted()
{
return DateTime.UtcNow > ProjectInfo.StartDate;
}
public bool NostrMetadataCreated()
{
return !string.IsNullOrEmpty(Metadata?.Name);
}
public bool NostrApplicationSpecificDataCreated()
{
return !string.IsNullOrEmpty(ProjectInfoEventId);
}
}