2024-03-14 19:25:27 +00:00
|
|
|
import { column, SnakeCaseNamingStrategy } from '@adonisjs/lucid/orm';
|
2023-03-24 10:41:52 +00:00
|
|
|
import { DateTime } from 'luxon';
|
2024-03-14 19:25:27 +00:00
|
|
|
import BaseModel from './BaseModel.js';
|
2023-03-24 10:41:52 +00:00
|
|
|
|
|
|
|
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
|
|
|
}
|