import { DateTime } from 'luxon' import { column } from '@adonisjs/lucid/orm' import BaseModel from '#models/base_model' export default class Group extends BaseModel { @column({ isPrimary: true }) declare id: number @column() declare name: string @column() declare active: boolean /** Every article up to here was fetched successfully (see FetchRangeService). */ @column({ columnName: 'last_indexed_id' }) declare lastIndexedId: bigint /** Download bodies of obfuscated articles to identify them (bandwidth-heavy). */ @column({ columnName: 'fetch_bodies' }) declare fetchBodies: boolean /** How far the scheduler has queued fetch jobs. */ @column({ columnName: 'last_queued_id' }) declare lastQueuedId: bigint @column.dateTime({ autoCreate: true }) declare createdAt: DateTime @column.dateTime({ autoCreate: true, autoUpdate: true }) declare updatedAt: DateTime }