mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 20:19:26 +01:00
Add color in skill
This commit is contained in:
@@ -15,6 +15,9 @@ export default class Skill extends BaseModel {
|
||||
@column()
|
||||
public fileId: number
|
||||
|
||||
@column()
|
||||
public color: string
|
||||
|
||||
@column.dateTime({ autoCreate: true })
|
||||
public createdAt: DateTime
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ export default class SkillStoreValidator {
|
||||
public schema = schema.create({
|
||||
name: schema.string(),
|
||||
cover: schema.string(),
|
||||
color: schema.string()
|
||||
})
|
||||
public messages = {
|
||||
required: 'The field {{field}} is required'
|
||||
|
||||
@@ -8,6 +8,7 @@ export default class SkillUpdateValidator {
|
||||
public schema = schema.create({
|
||||
name: schema.string.optional(),
|
||||
cover: schema.string.optional(),
|
||||
color: schema.string.optional()
|
||||
})
|
||||
|
||||
public messages = {
|
||||
|
||||
@@ -7,6 +7,7 @@ export default class Skills extends BaseSchema {
|
||||
this.schema.createTable(this.tableName, (table) => {
|
||||
table.increments('id').primary()
|
||||
table.string('name').notNullable()
|
||||
table.string('color').notNullable()
|
||||
table
|
||||
.integer('file_id')
|
||||
.unsigned()
|
||||
|
||||
Reference in New Issue
Block a user