diff --git a/dsn.md b/dsn.md index 7626b03..faff0ac 100644 --- a/dsn.md +++ b/dsn.md @@ -60,12 +60,12 @@ `#{agd}` `#{soc}-[cdt|dbt|ern|agd|msg|act]` `#{soc}-[cdt|dbt|ern|agd|msg|act]-{yyyymm}` -`${soc}-{usr}` -`${soc}-{usr}-[cdt|dbt|ern|agd|msg|act]` -`${soc}-{usr}-[cdt|dbt|ern|agd|msg|act]-{yyyymm}` -`${agd}-{usr}` -`${agd}-{usr}-[cdt|dbt|ern|agd|msg|act]` -`${agd}-{usr}-[cdt|dbt|ern|agd|msg|act]-{yyyymm}` +`#{soc}-{usr}` +`#{soc}-{usr}-[cdt|dbt|ern|agd|msg|act]` +`#{soc}-{usr}-[cdt|dbt|ern|agd|msg|act]-{yyyymm}` +`#{agd}-{usr}` +`#{agd}-{usr}-[cdt|dbt|ern|agd|msg|act]` +`#{agd}-{usr}-[cdt|dbt|ern|agd|msg|act]-{yyyymm}` `hash = {usr?, soc?, agd?, rec?, utc?}` @@ -78,6 +78,7 @@ * `src` - `eid` 数据 - `doc` 数据关系 + - `pas.ts` 浏览权限 - `doc.ts` 数据文档 - `frm.ts` 数据操作 - `nav.ts` 浏览状态 diff --git a/src/doc.ts b/src/doc/doc.ts similarity index 75% rename from src/doc.ts rename to src/doc/doc.ts index 761ca99..39d23b0 100644 --- a/src/doc.ts +++ b/src/doc/doc.ts @@ -1,15 +1,4 @@ -import { Agd, Aut, Cdt, Crn, Dbt, Ern, Id, Msg, Soc, Usr } from "./typ.ts" - -export type Pas = { - usr: Usr["_id"], - nam: Usr["nam"], - cdt: (Cdt & { dbt: Dbt["amt"], ern: Ern["amt"] })[] | { - agr: Soc["agr"], soc: Soc["_id"], nam: Soc["nam"] - }, - sec: Soc["_id"][], - aut: Aut["aut"], - ban: Aut["ban"], -} +import { Agd, Aut, Cdt, Crn, Ern, Id, Msg, Soc, Usr } from "../typ.ts" export type Sum = { cdt: number, dbt: number, ern: number, act: number, msg: number } diff --git a/src/mdh.ts b/src/doc/mdh.ts similarity index 100% rename from src/mdh.ts rename to src/doc/mdh.ts diff --git a/src/doc/nav.ts b/src/doc/nav.ts new file mode 100644 index 0000000..c632cf4 --- /dev/null +++ b/src/doc/nav.ts @@ -0,0 +1,16 @@ +import { Agd, Soc, Usr } from "../typ.ts" + +export type Nav = { + usr?: Usr["_id"], + soc?: Soc["_id"], + agd?: Agd["_id"], + rec?: "cdt" | "dbt" | "ern" | "agd" | "msg" | "act", + utc?: number, +} + +function nav( + n: Nav, + h: string, +) { + +} diff --git a/src/doc/pas.ts b/src/doc/pas.ts new file mode 100644 index 0000000..d63d735 --- /dev/null +++ b/src/doc/pas.ts @@ -0,0 +1,12 @@ +import { Aut, Cdt, Dbt, Ern, Soc, Usr } from "../typ.ts" + +export type Pas = { + usr: Usr["_id"], + nam: Usr["nam"], + cdt: (Cdt & { dbt: Dbt["amt"], ern: Ern["amt"] })[] | { + agr: Soc["agr"], soc: Soc["_id"], nam: Soc["nam"] + }, + sec: Soc["_id"][], + aut: Aut["aut"], + ban: Aut["ban"], +} diff --git a/ui/bind/bind.ts b/ui/bind/bind.ts index 04e3c00..54dd641 100644 --- a/ui/bind/bind.ts +++ b/ui/bind/bind.ts @@ -1,4 +1,4 @@ -import { mdh } from "../../src/mdh.ts" +import { mdh } from "../../src/doc/mdh.ts" import { idnam, section } from "./section.ts" const main = document.getElementById("main") as HTMLDivElement diff --git a/ui/bind/section.ts b/ui/bind/section.ts index dc3da01..7afcbba 100644 --- a/ui/bind/section.ts +++ b/ui/bind/section.ts @@ -1,4 +1,4 @@ -import { pmd, htm } from "../../src/mdh.ts" +import { pmd, htm } from "../../src/doc/mdh.ts" export function section( h5: string,