forked from geolba/tethys.backend
- additional functionality for DatasetController.ts
- additional validation rules like 'uniqueArray' - additional Lucid models like BaseModel.ts for filling attributes, Title.ts, Description.ts - npm updates for @adonisjs/core
This commit is contained in:
parent
c4f4eff0d9
commit
e0ff71b117
44 changed files with 2002 additions and 1556 deletions
|
@ -1,41 +1,34 @@
|
|||
import {
|
||||
column,
|
||||
BaseModel,
|
||||
belongsTo,
|
||||
BelongsTo,
|
||||
SnakeCaseNamingStrategy,
|
||||
} from '@ioc:Adonis/Lucid/Orm';
|
||||
import { column, BaseModel, belongsTo, BelongsTo, SnakeCaseNamingStrategy } from '@ioc:Adonis/Lucid/Orm';
|
||||
import File from './File';
|
||||
|
||||
export default class HashValue extends BaseModel {
|
||||
public static namingStrategy = new SnakeCaseNamingStrategy();
|
||||
public static primaryKey = 'file_id, type';
|
||||
public static table = 'file_hashvalues';
|
||||
|
||||
public static namingStrategy = new SnakeCaseNamingStrategy();
|
||||
public static primaryKey = 'file_id, type';
|
||||
public static table = 'file_hashvalues';
|
||||
|
||||
// static get primaryKey () {
|
||||
// return 'type, value'
|
||||
// }
|
||||
|
||||
static get incrementing () {
|
||||
return false
|
||||
}
|
||||
static get incrementing() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// @column({
|
||||
// isPrimary: true,
|
||||
// })
|
||||
// public id: number;
|
||||
|
||||
// Foreign key is still on the same model
|
||||
// @column({
|
||||
// isPrimary: true,
|
||||
// })
|
||||
// public id: number;
|
||||
|
||||
// Foreign key is still on the same model
|
||||
@column({})
|
||||
public file_id: number;
|
||||
public file_id: number;
|
||||
|
||||
@column({})
|
||||
public type: string;
|
||||
public type: string;
|
||||
|
||||
@column()
|
||||
public value: string;
|
||||
@column()
|
||||
public value: string;
|
||||
|
||||
@belongsTo(() => File)
|
||||
public file: BelongsTo<typeof File>
|
||||
|
||||
}
|
||||
public file: BelongsTo<typeof File>;
|
||||
}
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue