default: {
camelToSnake: {
mimeType: "mime_type";
uploadedBy: "uploaded_by";
uploadedOn: "uploaded_on";
};
hasRevisions: true;
relations: readonly [
{
cardinality: "one";
hasRevisions: false;
name: "uploader";
sourceKey: "uploaded_by";
targetKey: "id";
targetTable: "users";
},
{
cardinality: "many";
hasRevisions: true;
name: "things";
sourceKey: "id";
targetKey: "id";
targetTable: "things";
through: {
sourceForeignKey: "file_id";
table: "thing_files";
targetForeignKey: "thing_id";
};
},
];
schema: {
completed: BooleanType<false>;
creator: ObjectType<string, false>;
description: ObjectType<string, false>;
id: StringType<false>;
license: StringType<false>;
mimeType: StringType<false>;
name: StringType<false>;
source: ObjectType<string, false>;
uploadedBy: StringType<false>;
uploadedOn: DateType<false>;
userCanDelete: VirtualType<unknown, false>;
userIsCreator: VirtualType<unknown, false>;
};
tableName: "files";
} = ...
Type declaration
ReadonlycamelToSnake: { mimeType: "mime_type"; uploadedBy: "uploaded_by"; uploadedOn: "uploaded_on" }
ReadonlyhasRevisions: true
Readonlyrelations: readonly [
{
cardinality: "one";
hasRevisions: false;
name: "uploader";
sourceKey: "uploaded_by";
targetKey: "id";
targetTable: "users";
},
{
cardinality: "many";
hasRevisions: true;
name: "things";
sourceKey: "id";
targetKey: "id";
targetTable: "things";
through: {
sourceForeignKey: "file_id";
table: "thing_files";
targetForeignKey: "thing_id";
};
},
]
Readonlyschema: {
completed: BooleanType<false>;
creator: ObjectType<string, false>;
description: ObjectType<string, false>;
id: StringType<false>;
license: StringType<false>;
mimeType: StringType<false>;
name: StringType<false>;
source: ObjectType<string, false>;
uploadedBy: StringType<false>;
uploadedOn: DateType<false>;
userCanDelete: VirtualType<unknown, false>;
userIsCreator: VirtualType<unknown, false>;
}
ReadonlytableName: "files"