diff --git a/lib/entities/Subscription.d.ts b/lib/entities/Subscription.d.ts index 322fe8770..87c9af76d 100644 --- a/lib/entities/Subscription.d.ts +++ b/lib/entities/Subscription.d.ts @@ -9,7 +9,7 @@ export interface Schema extends EntityShape { entity: String<32>; entityId: String<64>; name: String<32>; - description: Text; - config: WechatPublicConfig; - offset: Int<4>; + description?: Text; + config?: WechatPublicConfig; + offset?: Int<4>; } diff --git a/lib/general-app-domain/Subscription/Schema.d.ts b/lib/general-app-domain/Subscription/Schema.d.ts index cdf628587..20a3b8349 100644 --- a/lib/general-app-domain/Subscription/Schema.d.ts +++ b/lib/general-app-domain/Subscription/Schema.d.ts @@ -13,18 +13,18 @@ export declare type OpSchema = EntityShape & { entity: String<32>; entityId: String<64>; name: String<32>; - description: Text; - config: WechatPublicConfig; - offset: Int<4>; + description?: Text | null; + config?: WechatPublicConfig | null; + offset?: Int<4> | null; }; export declare type OpAttr = keyof OpSchema; export declare type Schema = EntityShape & { entity: String<32>; entityId: String<64>; name: String<32>; - description: Text; - config: WechatPublicConfig; - offset: Int<4>; + description?: Text | null; + config?: WechatPublicConfig | null; + offset?: Int<4> | null; } & { [A in ExpressionKey]?: any; }; diff --git a/lib/general-app-domain/Subscription/Storage.js b/lib/general-app-domain/Subscription/Storage.js index cb235976b..9151357c6 100644 --- a/lib/general-app-domain/Subscription/Storage.js +++ b/lib/general-app-domain/Subscription/Storage.js @@ -26,15 +26,12 @@ exports.desc = { } }, description: { - notNull: true, type: "text" }, config: { - notNull: true, type: "object" }, offset: { - notNull: true, type: "int", params: { width: 4, diff --git a/src/entities/Subscription.ts b/src/entities/Subscription.ts index 9c97567eb..a6ae6264d 100644 --- a/src/entities/Subscription.ts +++ b/src/entities/Subscription.ts @@ -19,9 +19,9 @@ export interface Schema extends EntityShape { entity: String<32>; entityId: String<64>; name: String<32>; - description: Text; - config: WechatPublicConfig; - offset: Int<4>; + description?: Text; + config?: WechatPublicConfig; + offset?: Int<4>; };