Skip to content

Commit 463a4f9

Browse files
Move PropertyValue into separate files 🚚
1 parent 1141e10 commit 463a4f9

22 files changed

+352
-271
lines changed

Src/Notion.Client/Models/PropertyValue.cs

Lines changed: 0 additions & 271 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace Notion.Client
2+
{
3+
public class CheckboxPropertyValue : PropertyValue
4+
{
5+
public override PropertyValueType Type => PropertyValueType.Checkbox;
6+
7+
public bool Checkbox { get; set; }
8+
}
9+
10+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Newtonsoft.Json;
2+
3+
namespace Notion.Client
4+
{
5+
public class CreatedByPropertyValue : PropertyValue
6+
{
7+
public override PropertyValueType Type => PropertyValueType.CreatedBy;
8+
9+
[JsonProperty("created_by")]
10+
public User CreatedBy { get; set; }
11+
}
12+
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Newtonsoft.Json;
2+
3+
namespace Notion.Client
4+
{
5+
public class CreatedTimePropertyValue : PropertyValue
6+
{
7+
public override PropertyValueType Type => PropertyValueType.CreatedTime;
8+
9+
[JsonProperty("created_time")]
10+
public string CreatedTime { get; set; }
11+
}
12+
13+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
namespace Notion.Client
2+
{
3+
public class DatePropertyValue : PropertyValue
4+
{
5+
public override PropertyValueType Type => PropertyValueType.Date;
6+
public Date Date { get; set; }
7+
}
8+
9+
public class Date
10+
{
11+
public string Start { get; set; }
12+
public string End { get; set; }
13+
}
14+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace Notion.Client
2+
{
3+
public class EmailPropertyValue : PropertyValue
4+
{
5+
public override PropertyValueType Type => PropertyValueType.Email;
6+
7+
public string Email { get; set; }
8+
}
9+
10+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System.Collections.Generic;
2+
3+
namespace Notion.Client
4+
{
5+
public class FilesPropertyValue : PropertyValue
6+
{
7+
public override PropertyValueType Type => PropertyValueType.Files;
8+
9+
public List<FileValue> Files { get; set; }
10+
}
11+
12+
public class FileValue
13+
{
14+
public string Name { get; set; }
15+
}
16+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
namespace Notion.Client
2+
{
3+
public class FormulaPropertyValue : PropertyValue
4+
{
5+
public override PropertyValueType Type => PropertyValueType.Formula;
6+
7+
public FormulaValue Formula { get; set; }
8+
}
9+
10+
public class FormulaValue
11+
{
12+
public string Type { get; set; }
13+
public string String { get; set; }
14+
public double? Number { get; set; }
15+
public bool Boolean { get; set; }
16+
public DatePropertyValue Date { get; set; }
17+
}
18+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Newtonsoft.Json;
2+
3+
namespace Notion.Client
4+
{
5+
public class LastEditedByPropertyValue : PropertyValue
6+
{
7+
public override PropertyValueType Type => PropertyValueType.LastEditedBy;
8+
9+
[JsonProperty("last_edited_by")]
10+
public User LastEditedBy { get; set; }
11+
}
12+
13+
}

0 commit comments

Comments
 (0)