34 lines
		
	
	
		
			748 B
		
	
	
	
		
			TypeScript
		
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			748 B
		
	
	
	
		
			TypeScript
		
	
	
	
import { DateTime } from 'luxon'
 | 
						|
import { BaseModel, belongsTo, column } from '@adonisjs/lucid/orm'
 | 
						|
import Line from './line.js'
 | 
						|
import type { BelongsTo } from '@adonisjs/lucid/types/relations'
 | 
						|
 | 
						|
export default class Log extends BaseModel {
 | 
						|
  @column({ isPrimary: true })
 | 
						|
  declare id: number
 | 
						|
 | 
						|
  @column()
 | 
						|
  declare path: string
 | 
						|
 | 
						|
  @column()
 | 
						|
  declare lineId: number
 | 
						|
 | 
						|
  @belongsTo(() => Line)
 | 
						|
  declare line: BelongsTo<typeof Line>
 | 
						|
 | 
						|
  @column({ columnName: 'PID' })
 | 
						|
  declare PID: string
 | 
						|
 | 
						|
  @column({ columnName: 'SN' })
 | 
						|
  declare SN: string
 | 
						|
 | 
						|
  @column()
 | 
						|
  declare description: string
 | 
						|
 | 
						|
  @column.dateTime({ autoCreate: true })
 | 
						|
  declare createdAt: DateTime
 | 
						|
 | 
						|
  @column.dateTime({ autoCreate: true, autoUpdate: true })
 | 
						|
  declare updatedAt: DateTime
 | 
						|
}
 |