Skip to content

Commit 44fda8d

Browse files
committed
Added a test table with default values to Codegen.Tests
1 parent fc456ad commit 44fda8d

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

  • crates/bindings-csharp/Codegen.Tests/fixtures/diag

crates/bindings-csharp/Codegen.Tests/fixtures/diag/Lib.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.ComponentModel;
12
using SpacetimeDB;
23

34
public enum LocalEnum { }
@@ -361,6 +362,19 @@ public static partial class InAnotherNamespace
361362
public partial struct TestDuplicateTableName { }
362363
}
363364

365+
[SpacetimeDB.Table]
366+
public partial struct TestDefaultFeildValues
367+
{
368+
[Unique]
369+
public int? UniqueField;
370+
371+
[Default(5)]
372+
public int IntFeildWithDefault;
373+
374+
[Default("Attribute defined default value")]
375+
public string StringFeildWithDefault;
376+
}
377+
364378
[SpacetimeDB.Table]
365379
[SpacetimeDB.Index.BTree(Name = "TestIndexWithoutColumns")]
366380
[SpacetimeDB.Index.BTree(Name = "TestIndexWithEmptyColumns", Columns = [])]

0 commit comments

Comments
 (0)