2023-03-24 10:41:52 +00:00
|
|
|
import { column, BaseModel, SnakeCaseNamingStrategy } from '@ioc:Adonis/Lucid/Orm';
|
|
|
|
import { DateTime } from 'luxon';
|
|
|
|
|
|
|
|
export default class Project extends BaseModel {
|
|
|
|
public static namingStrategy = new SnakeCaseNamingStrategy();
|
|
|
|
public static primaryKey = 'id';
|
|
|
|
public static table = 'projects';
|
|
|
|
public static selfAssignPrimaryKey = false;
|
|
|
|
|
|
|
|
@column({
|
|
|
|
isPrimary: true,
|
|
|
|
})
|
|
|
|
public id: number;
|
|
|
|
|
|
|
|
@column({})
|
|
|
|
public label: string;
|
|
|
|
|
|
|
|
@column({})
|
|
|
|
public name: string;
|
|
|
|
|
|
|
|
@column({})
|
|
|
|
public description: string;
|
|
|
|
|
|
|
|
@column.dateTime({
|
|
|
|
autoCreate: true,
|
2023-06-22 15:20:04 +00:00
|
|
|
})
|
|
|
|
public created_at: DateTime;
|
2023-03-24 10:41:52 +00:00
|
|
|
|
2023-06-22 15:20:04 +00:00
|
|
|
@column.dateTime({
|
2023-03-24 10:41:52 +00:00
|
|
|
autoCreate: true,
|
2023-06-22 15:20:04 +00:00
|
|
|
autoUpdate: true,
|
|
|
|
})
|
|
|
|
public updated_at: DateTime;
|
2023-03-24 10:41:52 +00:00
|
|
|
}
|