const makeId = require("../../util/makeId"); const fileSerializer = require("../FileSerializer"); /** * @description 题目信息 * @typedef {Object} QuestionSerializerType * @property {number|string} id 题目id * @property {string} name 题目名称 * @property {string} description 题目描述 * @property {Object} assignmentType 作业类型 * @property {Object} type 题目类型 * @property {number} creator 创建者id * @property {number} expectTime 预计完成时间 * @property {number} difficulty 题目难度 * @property {FileSerializerType} file 题目文件 */ /** * @description 题目信息 * @returns {QuestionSerializerType} */ module.exports = () => { return { id: makeId(), name: "独立的小易", description: "小易为了向他的父母表现他已经长大独立了,他决定搬出去自己居住一段时间。一个人生活增加了许多花费: 小易每天必须吃一个水果并且需要每天支付x元的房屋租金。当前小易手中已经有f个水果和d元钱,小易也能去商店购买一些水果,商店每个水果售卖p元。小易为了表现他独立生活的能力,希望能独立生活的时间越长越好,小易希望你来帮他计算一下他最多能独立生活多少天。", assignmentType: { name: "DOCUMENT", value: "文档作业" }, type: { name: "JAVA", value: "JAVA" }, creator: makeId(), expectTime: 20, difficulty: 1, file: [fileSerializer(), fileSerializer()] }; };