2022-02-18 18:44:08 +01:00
|
|
|
const baseRow = {
|
2022-02-18 16:47:15 +01:00
|
|
|
_id: "ro_ta_5b1649e42a5b41dea4ef7742a36a7a70_e6dc7e38cf1343b2b56760265201cda4",
|
|
|
|
type: "row",
|
|
|
|
tableId: "ta_5b1649e42a5b41dea4ef7742a36a7a70",
|
|
|
|
name: "Mike",
|
|
|
|
age: 30,
|
2022-02-18 18:44:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
const inputRow = {
|
|
|
|
...baseRow,
|
|
|
|
relationship: ["ro_ta_..."],
|
|
|
|
}
|
|
|
|
|
|
|
|
const row = {
|
|
|
|
...baseRow,
|
2022-02-18 16:47:15 +01:00
|
|
|
relationship: [
|
|
|
|
{
|
|
|
|
primaryDisplay: "Joe",
|
|
|
|
_id: "ro_ta_...",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2022-02-18 18:44:08 +01:00
|
|
|
const table = {
|
|
|
|
_id: "ta_5b1649e42a5b41dea4ef7742a36a7a70",
|
|
|
|
name: "People",
|
|
|
|
schema: {
|
|
|
|
name: {
|
|
|
|
type: "string",
|
|
|
|
name: "name",
|
|
|
|
},
|
|
|
|
age: {
|
|
|
|
type: "number",
|
|
|
|
name: "age",
|
|
|
|
},
|
|
|
|
relationship: {
|
|
|
|
type: "link",
|
|
|
|
name: "relationship",
|
|
|
|
tableId: "ta_...",
|
|
|
|
fieldName: "relatedColumn",
|
|
|
|
relationshipType: "many-to-many",
|
2022-02-17 20:55:37 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2022-02-18 18:44:08 +01:00
|
|
|
exports.table = {
|
|
|
|
value: table,
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.tables = {
|
|
|
|
value: [table],
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.inputRow = {
|
|
|
|
value: inputRow,
|
|
|
|
}
|
|
|
|
|
2022-02-17 20:55:37 +01:00
|
|
|
exports.row = {
|
2022-02-18 16:47:15 +01:00
|
|
|
value: row,
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.search = {
|
2022-02-17 20:55:37 +01:00
|
|
|
value: {
|
2022-02-18 16:47:15 +01:00
|
|
|
rows: [row],
|
|
|
|
hasNextPage: true,
|
|
|
|
bookmark: 10,
|
2022-02-17 20:55:37 +01:00
|
|
|
},
|
|
|
|
}
|