mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 20:19:26 +01:00
Change localKey to foreignKey
This commit is contained in:
@@ -14,7 +14,7 @@ export default class Announce extends BaseModel {
|
||||
public hoverColor: string
|
||||
|
||||
@belongsTo(() => Translation, {
|
||||
localKey: 'messageId'
|
||||
foreignKey: 'messageId'
|
||||
})
|
||||
public message: BelongsTo<typeof Translation>
|
||||
|
||||
|
||||
@@ -4,8 +4,7 @@ import {HttpContextContract} from '@ioc:Adonis/Core/HttpContext'
|
||||
export default class InformationUpdateValidator {
|
||||
public schema = schema.create({
|
||||
age: schema.number.optional(),
|
||||
code: schema.string.optional(),
|
||||
hiring_color: schema.string.optional()
|
||||
code: schema.string.optional()
|
||||
})
|
||||
public messages = {
|
||||
required: 'The field {{field}} is required'
|
||||
|
||||
@@ -11,6 +11,7 @@ export default class SubscriberStoreValidator {
|
||||
})
|
||||
])
|
||||
})
|
||||
|
||||
public messages = {
|
||||
required: 'The field {{field}} is required'
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ export default class UserStoreValidator {
|
||||
})
|
||||
])
|
||||
})
|
||||
|
||||
public messages = {
|
||||
required: 'The field {{field}} is required',
|
||||
'email.email': 'The email must be valid',
|
||||
|
||||
@@ -22,6 +22,7 @@ export default class UserUpdateValidator {
|
||||
confirmation_token: schema.string.optional({ trim: true, escape: true }),
|
||||
remember_me: schema.string.optional({ trim: true, escape: true }),
|
||||
})
|
||||
|
||||
public messages = {
|
||||
required: 'The field {{field}} is required',
|
||||
'email.email': 'The email must be valid',
|
||||
|
||||
Reference in New Issue
Block a user