import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity('motd')
export class MotdEntity {
    @PrimaryGeneratedColumn() id: number;
    @Column({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP()' }) date: Date;
    @Column({ type: 'varchar', length: 256 }) message: string;
    @Column({ type: 'varchar', length: 10, default: null, nullable: true }) alias: string | null;
    @Column({ type: 'varchar', length: 34, default: null, nullable: true }) permission: string | null;
    @Column({ type: 'int' }) created_by_account_id: number;
    @Column({ type: 'varchar', length: 35 }) created_by_account_name: string;
    @Column({ type: 'datetime', default: null }) expires: Date | null;
}
