-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestSchema.cs
33 lines (29 loc) · 1.08 KB
/
TestSchema.cs
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
namespace PowerSync.Common.Tests;
using PowerSync.Common.DB.Schema;
public class TestSchema
{
public static readonly Table Assets = new Table(new Dictionary<string, ColumnType>
{
{ "created_at", ColumnType.TEXT },
{ "make", ColumnType.TEXT },
{ "model", ColumnType.TEXT },
{ "serial_number", ColumnType.TEXT },
{ "quantity", ColumnType.INTEGER },
{ "user_id", ColumnType.TEXT },
{ "customer_id", ColumnType.TEXT },
{ "description", ColumnType.TEXT },
}, new TableOptions
{
Indexes = new Dictionary<string, List<string>> { { "makemodel", new List<string> { "make", "model" } } }
});
public static readonly Table Customers = new Table(new Dictionary<string, ColumnType>
{
{ "name", ColumnType.TEXT },
{ "email", ColumnType.TEXT }
});
public static readonly Schema AppSchema = new Schema(new Dictionary<string, Table>
{
{ "assets", Assets },
{ "customers", Customers }
});
}