tethys.backend/app/Models/HashValue.ts
Arno Kaimbacher 4714dfdd94
All checks were successful
CI Pipeline / japa-tests (push) Successful in 46s
- use latest prettier 3.0 with eslint-plugin-prettier: 5.0.0-alpha.2
- npm normal updates
- add all xslt and style asstes in extra folder public/assets2
- linting corrections
- delete local .env.test from git tracking: git rm --cached .env.test
- add .env.test into .gitignore file
- add edit functionality for editing by submitter
- npm updates
-added xslt3 packeage for builfing sef files
- added Language.ts class vor language table
- added version to datasetxml2oai-pmh.xslt
2023-07-17 19:13:30 +02:00

35 lines
814 B
TypeScript

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';
// static get primaryKey () {
// return 'type, value'
// }
public static get incrementing() {
return false;
}
// @column({
// isPrimary: true,
// })
// public id: number;
// Foreign key is still on the same model
@column({})
public file_id: number;
@column({})
public type: string;
@column()
public value: string;
@belongsTo(() => File)
public file: BelongsTo<typeof File>;
}