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

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

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