1"use strict";(globalThis.webpackChunkskillhub_docs=globalThis.webpackChunkskillhub_docs||[]).push([[2934],{8549(e,d,s){s.r(d),s.d(d,{assets:()=>t,contentTitle:()=>c,default:()=>j,frontMatter:()=>l,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"developer/architecture/domain-model","title":"\u9886\u57df\u6a21\u578b","description":"\u6838\u5fc3\u9886\u57df\u5b9e\u4f53\u548c\u5173\u7cfb","source":"@site/i18n/zh-CN/docusaurus-plugin-content-docs/current/04-developer/architecture/domain-model.md","sourceDirName":"04-developer/architecture","slug":"/developer/architecture/domain-model","permalink":"/zh-CN/docs/developer/architecture/domain-model","draft":false,"unlisted":false,"editUrl":"https://github.com/iflytek/skillhub/edit/main/document/docs/04-developer/architecture/domain-model.md","tags":[],"version":"current","sidebarPosition":2,"frontMatter":{"title":"\u9886\u57df\u6a21\u578b","sidebar_position":2,"description":"\u6838\u5fc3\u9886\u57df\u5b9e\u4f53\u548c\u5173\u7cfb"},"sidebar":"docsSidebar","previous":{"title":"\u7cfb\u7edf\u67b6\u6784","permalink":"/zh-CN/docs/developer/architecture/overview"},"next":{"title":"\u5b89\u5168\u67b6\u6784","permalink":"/zh-CN/docs/developer/architecture/security"}}');var r=s(4848),n=s(8453);const l={title:"\u9886\u57df\u6a21\u578b",sidebar_position:2,description:"\u6838\u5fc3\u9886\u57df\u5b9e\u4f53\u548c\u5173\u7cfb"},c="\u9886\u57df\u6a21\u578b",t={},h=[{value:"\u6838\u5fc3\u5b9e\u4f53",id:"\u6838\u5fc3\u5b9e\u4f53",level:2},{value:"Namespace\uff08\u547d\u540d\u7a7a\u95f4\uff09",id:"namespace\u547d\u540d\u7a7a\u95f4",level:3},{value:"NamespaceMember\uff08\u547d\u540d\u7a7a\u95f4\u6210\u5458\uff09",id:"namespacemember\u547d\u540d\u7a7a\u95f4\u6210\u5458",level:3},{value:"Skill\uff08\u6280\u80fd\uff09",id:"skill\u6280\u80fd",level:3},{value:"SkillVersion\uff08\u6280\u80fd\u7248\u672c\uff09",id:"skillversion\u6280\u80fd\u7248\u672c",level:3},{value:"SkillTag\uff08\u6280\u80fd\u6807\u7b7e\uff09",id:"skilltag\u6280\u80fd\u6807\u7b7e",level:3},{value:"\u5750\u6807\u7cfb\u7edf",id:"\u5750\u6807\u7cfb\u7edf",level:2},{value:"\u4e0b\u4e00\u6b65",id:"\u4e0b\u4e00\u6b65",level:2}];function x(e){const d={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.header,{children:(0,r.jsx)(d.h1,{id:"\u9886\u57df\u6a21\u578b",children:"\u9886\u57df\u6a21\u578b"})}),"\n",(0,r.jsx)(d.h2,{id:"\u6838\u5fc3\u5b9e\u4f53",children:"\u6838\u5fc3\u5b9e\u4f53"}),"\n",(0,r.jsx)(d.h3,{id:"namespace\u547d\u540d\u7a7a\u95f4",children:"Namespace\uff08\u547d\u540d\u7a7a\u95f4\uff09"}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"\u5b57\u6bb5"}),(0,r.jsx)(d.th,{children:"\u7c7b\u578b"}),(0,r.jsx)(d.th,{children:"\u8bf4\u660e"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"id"}),(0,r.jsx)(d.td,{children:"bigint"}),(0,r.jsx)(d.td,{children:"\u4e3b\u952e"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"slug"}),(0,r.jsx)(d.td,{children:"varchar(64)"}),(0,r.jsx)(d.td,{children:"URL \u53cb\u597d\u6807\u8bc6"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"display_name"}),(0,r.jsx)(d.td,{children:"varchar(128)"}),(0,r.jsx)(d.td,{children:"\u5c55\u793a\u540d"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"type"}),(0,r.jsx)(d.td,{children:"enum"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"GLOBAL"})," / ",(0,r.jsx)(d.code,{children:"TEAM"})]})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"description"}),(0,r.jsx)(d.td,{children:"text"}),(0,r.jsx)(d.td,{children:"\u63cf\u8ff0"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"status"}),(0,r.jsx)(d.td,{children:"enum"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"ACTIVE"})," / ",(0,r.jsx)(d.code,{children:"FROZEN"})," / ",(0,r.jsx)(d.code,{children:"ARCHIVED"})]})]})]})]}),"\n",(0,r.jsx)(d.h3,{id:"namespacemember\u547d\u540d\u7a7a\u95f4\u6210\u5458",children:"NamespaceMember\uff08\u547d\u540d\u7a7a\u95f4\u6210\u5458\uff09"}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"\u5b57\u6bb5"}),(0,r.jsx)(d.th,{children:"\u7c7b\u578b"}),(0,r.jsx)(d.th,{children:"\u8bf4\u660e"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"id"}),(0,r.jsx)(d.td,{children:"bigint"}),(0,r.jsx)(d.td,{children:"\u4e3b\u952e"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"namespace_id"}),(0,r.jsx)(d.td,{children:"bigint"}),(0,r.jsx)(d.td,{children:"\u547d\u540d\u7a7a\u95f4 ID"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"user_id"}),(0,r.jsx)(d.td,{children:"varchar(128)"}),(0,r.jsx)(d.td,{children:"\u7528\u6237 ID"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"role"}),(0,r.jsx)(d.td,{children:"enum"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"OWNER"})," / ",(0,r.jsx)(d.code,{children:"ADMIN"})," / ",(0,r.jsx)(d.code,{children:"MEMBER"})]})]})]})]}),"\n",(0,r.jsx)(d.h3,{id:"skill\u6280\u80fd",children:"Skill\uff08\u6280\u80fd\uff09"}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"\u5b57\u6bb5"}),(0,r.jsx)(d.th,{children:"\u7c7b\u578b"}),(0,r.jsx)(d.th,{children:"\u8bf4\u660e"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"id"}),(0,r.jsx)(d.td,{children:"bigint"}),(0,r.jsx)(d.td,{children:"\u4e3b\u952e"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"namespace_id"}),(0,r.jsx)(d.td,{children:"bigint"}),(0,r.jsx)(d.td,{children:"\u6240\u5c5e\u547d\u540d\u7a7a\u95f4"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"slug"}),(0,r.jsx)(d.td,{children:"varchar(128)"}),(0,r.jsx)(d.td,{children:"URL \u53cb\u597d\u6807\u8bc6"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"display_name"}),(0,r.jsx)(d.td,{children:"varchar(256)"}),(0,r.jsx)(d.td,{children:"\u5c55\u793a\u540d"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"summary"}),(0,r.jsx)(d.td,{children:"varchar(512)"}),(0,r.jsx)(d.td,{children:"\u6458\u8981"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"owner_id"}),(0,r.jsx)(d.td,{children:"varchar(128)"}),(0,r.jsx)(d.td,{children:"\u4e3b\u8981\u7ef4\u62a4\u4eba"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"visibility"}),(0,r.jsx)(d.td,{children:"enum"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"PUBLIC"})," / ",(0,r.jsx)(d.code,{children:"NAMESPACE_ONLY"})," / ",(0,r.jsx)(d.code,{children:"PRIVATE"})]})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"status"}),(0,r.jsx)(d.td,{children:"enum"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"ACTIVE"})," / ",(0,r.jsx)(d.code,{children:"HIDDEN"})," / ",(0,r.jsx)(d.code,{children:"ARCHIVED"})]})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"latest_version_id"}),(0,r.jsx)(d.td,{children:"bigint"}),(0,r.jsx)(d.td,{children:"\u6700\u65b0\u5df2\u53d1\u5e03\u7248\u672c"})]})]})]}),"\n",(0,r.jsxs)(d.p,{children:[(0,r.jsx)(d.strong,{children:"\u552f\u4e00\u7ea6\u675f"}),"\uff1a",(0,r.jsx)(d.code,{children:"(namespace_id, slug)"})]}),"\n",(0,r.jsx)(d.h3,{id:"skillversion\u6280\u80fd\u7248\u672c",children:"SkillVersion\uff08\u6280\u80fd\u7248\u672c\uff09"}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"\u5b57\u6bb5"}),(0,r.jsx)(d.th,{children:"\u7c7b\u578b"}),(0,r.jsx)(d.th,{children:"\u8bf4\u660e"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"id"}),(0,r.jsx)(d.td,{children:"bigint"}),(0,r.jsx)(d.td,{children:"\u4e3b\u952e"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"skill_id"}),(0,r.jsx)(d.td,{children:"bigint"}),(0,r.jsx)(d.td,{children:"\u6280\u80fd ID"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"version"}),(0,r.jsx)(d.td,{children:"varchar(32)"}),(0,r.jsx)(d.td,{children:"semver \u7248\u672c\u53f7"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"status"}),(0,r.jsx)(d.td,{children:"enum"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"DRAFT"})," / ",(0,r.jsx)(d.code,{children:"PENDING_REVIEW"})," / ",(0,r.jsx)(d.code,{children:"PUBLISHED"})," / ",(0,r.jsx)(d.code,{children:"REJECTED"})," / ",(0,r.jsx)(d.code,{children:"YANKED"})]})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"manifest_json"}),(0,r.jsx)(d.td,{children:"json"}),(0,r.jsx)(d.td,{children:"\u6587\u4ef6\u6e05\u5355"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"parsed_metadata_json"}),(0,r.jsx)(d.td,{children:"json"}),(0,r.jsx)(d.td,{children:"SKILL.md \u89e3\u6790\u7ed3\u679c"})]})]})]}),"\n",(0,r.jsxs)(d.p,{children:[(0,r.jsx)(d.strong,{children:"\u552f\u4e00\u7ea6\u675f"}),"\uff1a",(0,r.jsx)(d.code,{children:"(skill_id, version)"})]}),"\n",(0,r.jsx)(d.h3,{id:"skilltag\u6280\u80fd\u6807\u7b7e",children:"SkillTag\uff08\u6280\u80fd\u6807\u7b7e\uff09"}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"\u5b57\u6bb5"}),(0,r.jsx)(d.th,{children:"\u7c7b\u578b"}),(0,r.jsx)(d.th,{children:"\u8bf4\u660e"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"id"}),(0,r.jsx)(d.td,{children:"bigint"}),(0,r.jsx)(d.td,{children:"\u4e3b\u952e"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"skill_id"}),(0,r.jsx)(d.td,{children:"bigint"}),(0,r.jsx)(d.td,{children:"\u6280\u80fd ID"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"tag_name"}),(0,r.jsx)(d.td,{children:"varchar(64)"}),(0,r.jsx)(d.td,{children:"\u6807\u7b7e\u540d"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:"target_version_id"}),(0,r.jsx)(d.td,{children:"bigint"}),(0,r.jsx)(d.td,{children:"\u76ee\u6807\u7248\u672c"})]})]})]}),"\n",(0,r.jsxs)(d.p,{children:[(0,r.jsx)(d.strong,{children:"\u552f\u4e00\u7ea6\u675f"}),"\uff1a",(0,r.jsx)(d.code,{children:"(skill_id, tag_name)"})]}),"\n",(0,r.jsx)(d.h2,{id:"\u5750\u6807\u7cfb\u7edf",children:"\u5750\u6807\u7cfb\u7edf"}),"\n",(0,r.jsxs)(d.p,{children:["\u6280\u80fd\u5b8c\u6574\u5bfb\u5740\uff1a",(0,r.jsx)(d.code,{children:"@{namespace_slug}/{skill_slug}"})]}),"\n",(0,r.jsx)(d.h2,{id:"\u4e0b\u4e00\u6b65",children:"\u4e0b\u4e00\u6b65"}),"\n",(0,r.jsxs)(d.ul,{children:["\n",(0,r.jsxs)(d.li,{children:[(0,r.jsx)(d.a,{href:"./security",children:"\u5b89\u5168\u67b6\u6784"})," - \u5b89\u5168\u8bbe\u8ba1"]}),"\n"]})]})}function j(e={}){const{wrapper:d}={...(0,n.R)(),...e.components};return d?(0,r.jsx)(d,{...e,children:(0,r.jsx)(x,{...e})}):x(e)}},8453(e,d,s){s.d(d,{R:()=>l,x:()=>c});var i=s(6540);const r={},n=i.createContext(r);function l(e){const d=i.useContext(n);return i.useMemo(function(){return"function"==typeof e?e(d):{...d,...e}},[d,e])}function c(e){let d;return d=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),i.createElement(n.Provider,{value:d},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.