2023-09-18 23:57:18 +00:00
|
|
|
version: 2
|
|
|
|
sql:
|
|
|
|
- engine: "sqlite"
|
|
|
|
schema: "./database/schema.sql"
|
|
|
|
queries: "./database/query.sql"
|
|
|
|
gen:
|
|
|
|
go:
|
|
|
|
package: "database"
|
|
|
|
out: "database"
|
|
|
|
emit_json_tags: true
|
|
|
|
overrides:
|
2023-09-27 22:58:47 +00:00
|
|
|
# Documents
|
2023-09-18 23:57:18 +00:00
|
|
|
- column: "documents.md5"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
- column: "documents.filepath"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
2023-09-23 18:14:57 +00:00
|
|
|
- column: "documents.coverfile"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
2023-09-18 23:57:18 +00:00
|
|
|
- column: "documents.title"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
- column: "documents.author"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
- column: "documents.series"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
- column: "documents.series_index"
|
|
|
|
go_type:
|
|
|
|
type: "int64"
|
|
|
|
pointer: true
|
|
|
|
- column: "documents.lang"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
- column: "documents.description"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
- column: "documents.olid"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
2023-09-23 18:14:57 +00:00
|
|
|
- column: "documents.gbid"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
- column: "documents.isbn10"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
- column: "documents.isbn13"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
|
2023-09-27 22:58:47 +00:00
|
|
|
# Metadata
|
2023-09-23 18:14:57 +00:00
|
|
|
- column: "metadata.title"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
- column: "metadata.author"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
- column: "metadata.description"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
- column: "metadata.gbid"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
- column: "metadata.olid"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
- column: "metadata.isbn10"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
- column: "metadata.isbn13"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
2023-09-18 23:57:18 +00:00
|
|
|
|
2023-09-27 22:58:47 +00:00
|
|
|
# Devices
|
|
|
|
- column: "devices.id"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
- column: "devices.user_id"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
- column: "devices.device_name"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
- column: "devices.sync"
|
|
|
|
go_type:
|
|
|
|
type: "bool"
|
|
|
|
- column: "devices.created_at"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
|
|
|
|
# Devices
|
|
|
|
- column: "users.pass"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
- column: "users.time_offset"
|
|
|
|
go_type:
|
|
|
|
type: "string"
|
|
|
|
pointer: true
|
|
|
|
|
2023-09-18 23:57:18 +00:00
|
|
|
# Do not generate JSON
|
|
|
|
- column: "documents.synced"
|
|
|
|
go_struct_tag: 'json:"-"'
|
|
|
|
- column: "documents.olid"
|
|
|
|
go_struct_tag: 'json:"-"'
|
|
|
|
- column: "documents.deleted"
|
|
|
|
go_struct_tag: 'json:"-"'
|
|
|
|
- column: "users.pass"
|
|
|
|
go_struct_tag: 'json:"-"'
|
|
|
|
- column: "users.admin"
|
|
|
|
go_struct_tag: 'json:"-"'
|