first commit
This commit is contained in:
commit
3c0479faf0
169 files changed
+27617
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { SiteSchema } from '#database/schema'
|
||||
import { column } from '@adonisjs/lucid/orm'
|
||||
|
||||
/**
|
||||
* SQLite stores booleans as 0/1: convert them back when reading.
|
||||
*/
|
||||
const toBoolean = (value: unknown) => (value === null ? null : Boolean(value))
|
||||
|
||||
export default class Site extends SiteSchema {
|
||||
@column({ consume: toBoolean })
|
||||
declare active: boolean
|
||||
|
||||
@column({ consume: toBoolean })
|
||||
declare lastOk: boolean | null
|
||||
}
|
||||
Reference in new issue
Block a user