import { type IType, defineEntity, p } from '@mikro-orm/core';

export class IcrServerconfig {
  Id!: IType<number, bigint>;
  Name?: string;
  Hour!: number;
  Status!: number;
  Revision!: number;
  CreatedBy?: IType<number, bigint>;
  CreatedTime?: Date;
  UpdatedBy?: IType<number, bigint>;
  UpdatedTime?: Date;
  IsDeleted?: unknown;
}

export const IcrServerconfigSchema = defineEntity({
  class: IcrServerconfig,
  properties: {
    Id: p.bigint().name('Id').columnType('bigint'),
    Name: p.string().name('Name').nullable(),
    Hour: p.integer().name('Hour'),
    Status: p.integer().name('Status'),
    Revision: p.integer().name('Revision'),
    CreatedBy: p.bigint().name('CreatedBy').columnType('bigint').nullable(),
    CreatedTime: p.datetime().name('CreatedTime').length(3).nullable(),
    UpdatedBy: p.bigint().name('UpdatedBy').columnType('bigint').nullable(),
    UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable(),
    IsDeleted: p.array().name('IsDeleted').nullable(),
  },
});
