{"id":22330772,"url":"https://github.com/one-programmer/op-scaffold","last_synced_at":"2025-03-26T07:10:08.942Z","repository":{"id":113140402,"uuid":"149720582","full_name":"one-programmer/op-scaffold","owner":"one-programmer","description":"通过Electron开发，基于数据库生成D2 Admin代码的客户端","archived":false,"fork":false,"pushed_at":"2019-03-14T05:10:13.000Z","size":1184,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-31T08:34:21.889Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/one-programmer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-21T06:35:25.000Z","updated_at":"2019-03-14T05:10:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"5521057e-4901-4428-9574-1b947802bfb1","html_url":"https://github.com/one-programmer/op-scaffold","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-programmer%2Fop-scaffold","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-programmer%2Fop-scaffold/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-programmer%2Fop-scaffold/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/one-programmer%2Fop-scaffold/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/one-programmer","download_url":"https://codeload.github.com/one-programmer/op-scaffold/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245605730,"owners_count":20643030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-04T04:07:44.143Z","updated_at":"2025-03-26T07:10:08.926Z","avatar_url":"https://github.com/one-programmer.png","language":"JavaScript","readme":"# op-scaffold\n\n\u003e 代码生成工具\n\n## Context\n\n代码生成器上下文信息为代码生成过程中，目标项目`.op/doRender.js`接收到的参数，通过这些参数来进行代码生成\n\n### sourceDir\n\n项目目录，例如：`/Users/bohan/Work/Tmp/op-d2-start-kit`\n\n### dataConfig\n\n配置信息，例如：\n\n```json\n{\n  \"name\": \"voice_tipoff\",\n  \"url\": \"/api/admin/voice_tipoff/\",\n  \"title\": \"voice_tipoff\",\n  \"listEnable\": true,\n  \"editEnable\": true,\n  \"addEnable\": true,\n  \"searchEnable\": false\n}\n```\n\n- name: 生成代码的目录名称\n- url: 接口地址\n- title: 中文标题\n- listEnable: 是否有列表\n- editEnable: 是否有编辑\n- addEnable: 是否有新增\n- searchEnable: 是否有搜索\n\n### fields\n\n字段信息，例如：\n\n```json\n[\n    {\n        \"key\": \"id\",\n        \"name\": \"\",\n        \"type\": \"number\",\n        \"read\": true,\n        \"write\": false,\n        \"require\": true,\n        \"choices\": []\n    },\n    {\n        \"key\": \"updated_at\",\n        \"name\": \"\",\n        \"type\": \"datetime\",\n        \"read\": true,\n        \"write\": true,\n        \"require\": true,\n        \"choices\": []\n    },\n    ...\n]\n```\n\n- key: 字段名\n- name: 中文含义\n- type: 类型\n  - string: 字符类型\n  - text: 文本类型\n  - number: 数字类型\n  - datetime: 日期类型\n  - boolean: 布尔类型\n  - image: 图片类型\n  - file: 文件类型\n  - content: 富文本类型\n- read: 是否可读\n- write: 是否可写\n- require: 是否必填\n- choices: 选项。当类型为字符类型时可添加选项，目前支持两种格式\n  - 键值对形式\n  - 接口获取\n\n### searchList\n\n搜索字段列表，例如：\n\n```json\n[\n    {\n        \"key\": \"test\",\n        \"name\": \"测试\",\n        \"type\": \"string\",\n        \"choices\": []\n    },\n    ...\n]\n```\n\n- key: 字段名\n- name: 中文含义\n- type: 类型\n  - string: 字符类型\n  - datetime: 日期类型\n- choices: 选项。当类型为字符类型时可添加选项，目前支持两种格式\n  - 键值对形式\n  - 接口获取\n\n## How to start\n\n``` bash\ngit clone https://github.com/one-programmer/op-d2-start-kit.git\ncd op-d2-start-kit\nnpm install\n```\n\n#### Build Setup\n\n``` bash\n# install dependencies\nnpm install\n\n# serve with hot reload at localhost:9080\nnpm run dev\n\n# build electron application for production\nnpm run build\n\n# run unit \u0026 end-to-end tests\nnpm test\n\n\n# lint all JS/Vue component files in `src/`\nnpm run lint\n\n```\n\n---\n\nThis project was generated with [electron-vue](https://github.com/SimulatedGREG/electron-vue)@[80dc2ec](https://github.com/SimulatedGREG/electron-vue/tree/80dc2ece3425c558bfb2efbd57c3071e1b71be6d) using [vue-cli](https://github.com/vuejs/vue-cli). Documentation about the original structure can be found [here](https://simulatedgreg.gitbooks.io/electron-vue/content/index.html).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fone-programmer%2Fop-scaffold","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fone-programmer%2Fop-scaffold","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fone-programmer%2Fop-scaffold/lists"}