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

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

export const IcrServerconfigSchema = defineEntity({
  class: IcrServerconfig,
  properties: {
    Id: p.bigint().name('Id'),
    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').nullable(),
    CreatedTime: p.datetime().name('CreatedTime').length(3).nullable(),
    UpdatedBy: p.bigint().name('UpdatedBy').nullable(),
    UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable(),
    IsDeleted: p.array().name('IsDeleted').nullable(),
  },
});
