import { Provide } from '@midwayjs/core';
import { CoolController, BaseController } from '@cool-midway/core';
import { ProjectTimeLogEntity } from '../../entity/time_log';
import { ProjectTimeLogService } from '../../service/time_log';

/**
 * 工时记录
 */
@Provide()
@CoolController({
  api: ['add', 'delete', 'page'],
  entity: ProjectTimeLogEntity,
  service: ProjectTimeLogService,
  pageQueryOp: {
    fieldEq: ['taskId', 'userId'],
    addOrderBy: {
      logDate: 'DESC',
    },
  },
})
export class AdminProjectTimeLogController extends BaseController {}
