first commit
This commit is contained in:
commit
3c0479faf0
169 files changed
+27617
No files matched your search
@@ -0,0 +1,5 @@
|
||||
import { AuditLogSchema } from '#database/schema'
|
||||
|
||||
export type AuditStatus = 'running' | 'success' | 'error'
|
||||
|
||||
export default class AuditLog extends AuditLogSchema {}
|
||||
@@ -0,0 +1,3 @@
|
||||
import { CaddyfileVersionSchema } from '#database/schema'
|
||||
|
||||
export default class CaddyfileVersion extends CaddyfileVersionSchema {}
|
||||
@@ -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
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { UserSchema } from '#database/schema'
|
||||
import hash from '@adonisjs/core/services/hash'
|
||||
import { compose } from '@adonisjs/core/helpers'
|
||||
import { withAuthFinder } from '@adonisjs/auth/mixins/lucid'
|
||||
|
||||
export default class User extends compose(
|
||||
UserSchema,
|
||||
withAuthFinder(hash, { uids: ['username'], passwordColumnName: 'password' })
|
||||
) {}
|
||||
Reference in new issue
Block a user