From 4ff005a0110f70d1f649d35c39a7ad5208ed9a31 Mon Sep 17 00:00:00 2001 From: Xc Date: Sat, 12 Aug 2023 17:28:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BA=86i18n=E7=9A=84?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/base-app-domain/I18n/Schema.d.ts | 20 +++++++++++++------- lib/base-app-domain/I18n/Storage.js | 9 ++++++++- lib/entities/I18n.d.ts | 5 +++-- lib/entities/I18n.js | 3 ++- src/entities/I18n.ts | 8 +++++--- 5 files changed, 31 insertions(+), 14 deletions(-) diff --git a/lib/base-app-domain/I18n/Schema.d.ts b/lib/base-app-domain/I18n/Schema.d.ts index 8aae15e..171ccbd 100644 --- a/lib/base-app-domain/I18n/Schema.d.ts +++ b/lib/base-app-domain/I18n/Schema.d.ts @@ -8,15 +8,17 @@ import * as ModiEntity from "../ModiEntity/Schema"; import * as OperEntity from "../OperEntity/Schema"; export declare type OpSchema = EntityShape & { module: String<64>; - position: String<256>; - languange: String<32>; + position: String<188>; + namespace: String<256>; + language: String<32>; data: Object; }; export declare type OpAttr = keyof OpSchema; export declare type Schema = EntityShape & { module: String<64>; - position: String<256>; - languange: String<32>; + position: String<188>; + namespace: String<256>; + language: String<32>; data: Object; modiEntity$entity?: Array; modiEntity$entity$$aggr?: AggregationResult; @@ -32,7 +34,8 @@ declare type AttrFilter = { $$updateAt$$: Q_DateValue; module: Q_StringValue; position: Q_StringValue; - languange: Q_StringValue; + namespace: Q_StringValue; + language: Q_StringValue; data: Object; modiEntity$entity: ModiEntity.Filter & SubQueryPredicateMetadata; operEntity$entity: OperEntity.Filter & SubQueryPredicateMetadata; @@ -47,7 +50,8 @@ export declare type Projection = { $$seq$$?: number; module?: number; position?: number; - languange?: number; + namespace?: number; + language?: number; data?: number | Object; modiEntity$entity?: ModiEntity.Selection & { $entity: "modiEntity"; @@ -78,7 +82,9 @@ export declare type SortAttr = { } | { position: number; } | { - languange: number; + namespace: number; +} | { + language: number; } | { [k: string]: any; } | OneOf>; diff --git a/lib/base-app-domain/I18n/Storage.js b/lib/base-app-domain/I18n/Storage.js index a7a2e72..bc1541a 100644 --- a/lib/base-app-domain/I18n/Storage.js +++ b/lib/base-app-domain/I18n/Storage.js @@ -12,13 +12,20 @@ exports.desc = { } }, position: { + notNull: true, + type: "varchar", + params: { + length: 188 + } + }, + namespace: { notNull: true, type: "varchar", params: { length: 256 } }, - languange: { + language: { notNull: true, type: "varchar", params: { diff --git a/lib/entities/I18n.d.ts b/lib/entities/I18n.d.ts index 7d56668..a11198b 100644 --- a/lib/entities/I18n.d.ts +++ b/lib/entities/I18n.d.ts @@ -2,7 +2,8 @@ import { String } from '../types/DataType'; import { EntityShape } from '../types/Entity'; export interface Schema extends EntityShape { module: String<64>; - position: String<256>; - languange: String<32>; + position: String<188>; + namespace: String<256>; + language: String<32>; data: Object; } diff --git a/lib/entities/I18n.js b/lib/entities/I18n.js index 38b6792..2b7b599 100644 --- a/lib/entities/I18n.js +++ b/lib/entities/I18n.js @@ -8,7 +8,8 @@ var entityDesc = { attr: { module: '模块', position: '文件位置', - languange: '语言', + namespace: '命名空间', + language: '语言', data: '数据' }, }, diff --git a/src/entities/I18n.ts b/src/entities/I18n.ts index eaccc52..c7d57c3 100644 --- a/src/entities/I18n.ts +++ b/src/entities/I18n.ts @@ -4,8 +4,9 @@ import { EntityDesc } from '../types/EntityDesc'; export interface Schema extends EntityShape { module: String<64>; - position: String<256>; - languange: String<32>; + position: String<188>; + namespace: String<256>; + language: String<32>; data: Object; }; @@ -16,7 +17,8 @@ const entityDesc: EntityDesc = { attr: { module: '模块', position: '文件位置', - languange: '语言', + namespace: '命名空间', + language: '语言', data: '数据' }, },