aboutsummaryrefslogtreecommitdiff
path: root/src/lib/models/BaseModel.ts
blob: 8ed5ed33646fe9115bd926b949eb2e94ec285ea9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { Model } from 'sequelize';

const NEVER_USED = 'This should never be executed';

export abstract class BaseModel<A, B> extends Model<A, B> {
	/**
	 * The date when the row was created.
	 */
	public get createdAt(): Date {
		throw new Error(NEVER_USED);
	}

	/**
	 * The date when the row was last updated.
	 */
	public get updatedAt(): Date {
		throw new Error(NEVER_USED);
	}
}