Add PostColor and content

This commit is contained in:
2021-08-28 22:36:38 +02:00
parent 48552f0ccf
commit 8f81926447
12 changed files with 156 additions and 1 deletions

19
app/Models/PostColor.ts Normal file
View File

@@ -0,0 +1,19 @@
import { DateTime } from 'luxon'
import { BaseModel, column } from '@ioc:Adonis/Lucid/Orm'
export default class PostColor extends BaseModel {
@column({ isPrimary: true })
public id: number
@column()
public name: string
@column()
public color: string
@column.dateTime({ autoCreate: true })
public createdAt: DateTime
@column.dateTime({ autoCreate: true, autoUpdate: true })
public updatedAt: DateTime
}