import { Column, UpdateDateColumn } from 'typeorm'
import { BaseEntity } from './base.entity'

export class UserModifiableEntity<T> extends BaseEntity<T> {
	/**
	 * Id of the user who created the entity
	 */
	@Column({
		type: 'uuid',
		nullable: true,
	})
	createdBy?: string

	/**
	 * Date at which the entity was last modified
	 */
	@UpdateDateColumn()
	lastUpdatedAt?: string

	/**
	 * Id of the user who last updated the entity
	 */
	@Column({
		type: 'uuid',
		nullable: true,
	})
	lastUpdatedBy?: string
}
