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

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

export const IcrHomeworkanswerdraftcoordinateSchema = defineEntity({
  class: IcrHomeworkanswerdraftcoordinate,
  comment: '作业草稿纸',
  properties: {
    Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'),
    HomeworkAnswerDraftId: p.bigint().name('HomeworkAnswerDraftId'),
    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('创建时间'),
  },
});
