Skip to content

Commit

Permalink
Merge pull request #48 from aleksei-oecd/bfix/filesProperty
Browse files Browse the repository at this point in the history
Rename database property file to files 🐛
  • Loading branch information
KoditkarVedant authored Aug 2, 2021
2 parents b5818b1 + c09ed7f commit 372751b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Notion.Client
{
public class FileProperty : Property
public class FilesProperty : Property
{
public override PropertyType Type => PropertyType.File;
public override PropertyType Type => PropertyType.Files;
public Dictionary<string, object> File { get; set; }
}
}
2 changes: 1 addition & 1 deletion Src/Notion.Client/Models/Database/Properties/Property.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Notion.Client
[JsonSubtypes.KnownSubType(typeof(CreatedTimeProperty), PropertyType.CreatedTime)]
[JsonSubtypes.KnownSubType(typeof(DateProperty), PropertyType.Date)]
[JsonSubtypes.KnownSubType(typeof(EmailProperty), PropertyType.Email)]
[JsonSubtypes.KnownSubType(typeof(FileProperty), PropertyType.File)]
[JsonSubtypes.KnownSubType(typeof(FilesProperty), PropertyType.Files)]
[JsonSubtypes.KnownSubType(typeof(FormulaProperty), PropertyType.Formula)]
[JsonSubtypes.KnownSubType(typeof(LastEditedByProperty), PropertyType.LastEditedBy)]
[JsonSubtypes.KnownSubType(typeof(LastEditedTimeProperty), PropertyType.LastEditedTime)]
Expand Down
4 changes: 2 additions & 2 deletions Src/Notion.Client/Models/Database/Properties/PropertyType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public enum PropertyType
[EnumMember(Value = "people")]
People,

[EnumMember(Value = "file")]
File,
[EnumMember(Value = "files")]
Files,

[EnumMember(Value = "checkbox")]
Checkbox,
Expand Down
4 changes: 2 additions & 2 deletions Test/Notion.UnitTests/PropertyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class PropertyTests
[InlineData(typeof(CreatedTimeProperty), PropertyType.CreatedTime)]
[InlineData(typeof(DateProperty), PropertyType.Date)]
[InlineData(typeof(EmailProperty), PropertyType.Email)]
[InlineData(typeof(FileProperty), PropertyType.File)]
[InlineData(typeof(FilesProperty), PropertyType.Files)]
[InlineData(typeof(FormulaProperty), PropertyType.Formula)]
[InlineData(typeof(LastEditedByProperty), PropertyType.LastEditedBy)]
[InlineData(typeof(LastEditedTimeProperty), PropertyType.LastEditedTime)]
Expand Down Expand Up @@ -41,7 +41,7 @@ public void TestPropertyType(Type type, PropertyType expectedPropertyType)
[InlineData(typeof(CreatedTimeProperty), "created_time")]
[InlineData(typeof(DateProperty), "date")]
[InlineData(typeof(EmailProperty), "email")]
[InlineData(typeof(FileProperty), "file")]
[InlineData(typeof(FilesProperty), "files")]
[InlineData(typeof(FormulaProperty), "formula")]
[InlineData(typeof(LastEditedByProperty), "last_edited_by")]
[InlineData(typeof(LastEditedTimeProperty), "last_edited_time")]
Expand Down

0 comments on commit 372751b

Please sign in to comment.