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

export class IcrHomeworkanswercoordinate {
  [PrimaryKeyProp]?: 'Id';
  Id!: bigint;
  HomeworkAnswerId!: bigint;
  Content?: unknown;
  Revision!: number;
  CreatedBy?: bigint;
  CreatedTime!: Date;
}

export const IcrHomeworkanswercoordinateSchema = defineEntity({
  class: IcrHomeworkanswercoordinate,
  comment: '作业回答',
  properties: {
    Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'),
    HomeworkAnswerId: p.bigint().name('HomeworkAnswerId'),
    Content: p.array().name('Content').length(4294967295).nullable(),
    Revision: p.integer().name('Revision').comment('乐观锁'),
    CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'),
    CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'),
  },
});
