build
This commit is contained in:
parent
afefc65639
commit
0690e3be9b
|
|
@ -2,9 +2,9 @@
|
|||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, boolean, {
|
||||
efPaths: string[];
|
||||
size: import("antd/es/button").ButtonSize | "mini";
|
||||
block: boolean | undefined;
|
||||
type: "primary" | "text" | "default" | "link" | "button" | "dashed" | "submit" | "reset" | undefined;
|
||||
size: string;
|
||||
block: boolean;
|
||||
type: string;
|
||||
executeText: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ export default function render(props: WebComponentProps<EntityDict, any, true, {
|
|||
executeText?: string;
|
||||
}, {
|
||||
upload: () => Promise<void>;
|
||||
}>): JSX.Element;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ export default function render(props: WebComponentProps<EntityDict, any, true, {
|
|||
executeText?: string;
|
||||
}, {
|
||||
upload: () => Promise<void>;
|
||||
}>): JSX.Element;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { Button } from 'antd';
|
|||
export default function render(props) {
|
||||
const { state, oakExecutable, oakExecuting, oakDirty, size, block, type, executeText } = props.data;
|
||||
const { t, upload, execute } = props.methods;
|
||||
const disabled = oakExecuting || ['uploading'].includes(state) || (oakExecutable === false && ['uploaded'].includes(state));
|
||||
const disabled = oakExecuting || ['uploading'].includes(state) || (oakExecutable !== true && ['uploaded'].includes(state));
|
||||
let text = executeText || t('common::action.confirm');
|
||||
if (oakExecuting) {
|
||||
text = t('executing', { text });
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|||
import { Space, Modal, Form, Input, Empty, Row, Col } from "antd";
|
||||
import { PlusOutlined } from "@ant-design/icons";
|
||||
import Style from "./web.module.less";
|
||||
import ImgBox from "oak-frontend-base/src/components/imgBox";
|
||||
import ImgBox from "oak-frontend-base/es/components/imgBox";
|
||||
export default function render(props) {
|
||||
const { isModalOpen, isModalOpen1, renderImgs, src, bridgeUrl, selectedId, } = props.data;
|
||||
const { t, onModalConfirm, chooseMethod, closeModal1, closeModal, onModal1Confirm, setSelectedId } = props.methods;
|
||||
|
|
|
|||
|
|
@ -147,7 +147,8 @@ export default OakComponent({
|
|||
extension,
|
||||
fileType,
|
||||
entityId,
|
||||
sort
|
||||
sort,
|
||||
uploadState: 'uploading',
|
||||
});
|
||||
this.features.extraFile2.addLocalFile(id, file);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import { EntityShape } from 'oak-domain/lib/types/Entity';
|
|||
export interface Schema extends EntityShape {
|
||||
origin: 'qiniu' | 'wechat' | 'unknown';
|
||||
type: 'image' | 'video' | 'audio' | 'file';
|
||||
bucket: String<16>;
|
||||
objectId: String<64>;
|
||||
bucket?: String<32>;
|
||||
objectId?: String<64>;
|
||||
tag1?: String<32>;
|
||||
tag2?: String<32>;
|
||||
filename: String<256>;
|
||||
|
|
@ -12,6 +12,7 @@ export interface Schema extends EntityShape {
|
|||
entity: String<32>;
|
||||
entityId: String<64>;
|
||||
extra1?: Text;
|
||||
extra2?: Object;
|
||||
extension?: String<16>;
|
||||
size?: Int<4>;
|
||||
sort?: Float<22, 10>;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ const entityDesc = {
|
|||
entity: '关联对象',
|
||||
entityId: '关联对象id',
|
||||
extra1: '额外信息',
|
||||
extra2: '非结构化额外信息',
|
||||
extension: '后缀名',
|
||||
size: '文件大小',
|
||||
sort: '排序',
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ import * as User from "../User/Schema";
|
|||
export type OpSchema = EntityShape & {
|
||||
origin: 'qiniu' | 'wechat' | 'unknown';
|
||||
type: 'image' | 'video' | 'audio' | 'file';
|
||||
bucket: String<16>;
|
||||
objectId: String<64>;
|
||||
bucket?: String<32> | null;
|
||||
objectId?: String<64> | null;
|
||||
tag1?: String<32> | null;
|
||||
tag2?: String<32> | null;
|
||||
filename: String<256>;
|
||||
|
|
@ -21,6 +21,7 @@ export type OpSchema = EntityShape & {
|
|||
entity: "article" | "articleMenu" | "sessionMessage" | "user" | string;
|
||||
entityId: String<64>;
|
||||
extra1?: Text | null;
|
||||
extra2?: Object | null;
|
||||
extension?: String<16> | null;
|
||||
size?: Int<4> | null;
|
||||
sort?: Float<22, 10> | null;
|
||||
|
|
@ -33,8 +34,8 @@ export type OpAttr = keyof OpSchema;
|
|||
export type Schema = EntityShape & {
|
||||
origin: 'qiniu' | 'wechat' | 'unknown';
|
||||
type: 'image' | 'video' | 'audio' | 'file';
|
||||
bucket: String<16>;
|
||||
objectId: String<64>;
|
||||
bucket?: String<32> | null;
|
||||
objectId?: String<64> | null;
|
||||
tag1?: String<32> | null;
|
||||
tag2?: String<32> | null;
|
||||
filename: String<256>;
|
||||
|
|
@ -42,6 +43,7 @@ export type Schema = EntityShape & {
|
|||
entity: "article" | "articleMenu" | "sessionMessage" | "user" | string;
|
||||
entityId: String<64>;
|
||||
extra1?: Text | null;
|
||||
extra2?: Object | null;
|
||||
extension?: String<16> | null;
|
||||
size?: Int<4> | null;
|
||||
sort?: Float<22, 10> | null;
|
||||
|
|
@ -72,6 +74,7 @@ type AttrFilter = {
|
|||
entity: Q_EnumValue<"article" | "articleMenu" | "sessionMessage" | "user" | string>;
|
||||
entityId: Q_StringValue;
|
||||
extra1: Q_StringValue;
|
||||
extra2: Object;
|
||||
extension: Q_StringValue;
|
||||
size: Q_NumberValue;
|
||||
sort: Q_NumberValue;
|
||||
|
|
@ -103,6 +106,7 @@ export type Projection = {
|
|||
entity?: number;
|
||||
entityId?: number;
|
||||
extra1?: number;
|
||||
extra2?: number | Object;
|
||||
extension?: number;
|
||||
size?: number;
|
||||
sort?: number;
|
||||
|
|
|
|||
|
|
@ -12,14 +12,12 @@ export const desc = {
|
|||
enumeration: ["image", "video", "audio", "file"]
|
||||
},
|
||||
bucket: {
|
||||
notNull: true,
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 16
|
||||
length: 32
|
||||
}
|
||||
},
|
||||
objectId: {
|
||||
notNull: true,
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 64
|
||||
|
|
@ -65,6 +63,9 @@ export const desc = {
|
|||
extra1: {
|
||||
type: "text"
|
||||
},
|
||||
extra2: {
|
||||
type: "object"
|
||||
},
|
||||
extension: {
|
||||
type: "varchar",
|
||||
params: {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{ "name": "文件", "attr": { "origin": "源", "type": "类型", "bucket": "桶", "objectId": "对象编号", "tag1": "标签一", "tag2": "标签二", "filename": "文件名", "md5": "md5", "entity": "关联对象", "entityId": "关联对象id", "extra1": "额外信息", "extension": "后缀名", "size": "文件大小", "sort": "排序", "fileType": "文件类型", "isBridge": "是否桥接访问", "uploadState": "上传状态", "uploadMeta": "上传需要的metadata" }, "v": { "origin": { "qiniu": "七牛云", "wechat": "微信", "unknown": "未知" }, "type": { "image": "图像", "video": "视频", "audio": "音频", "file": "文件" }, "uploadState": { "success": "上传成功", "failed": "上传失败", "uploading": "上传中" } } }
|
||||
{ "name": "文件", "attr": { "origin": "源", "type": "类型", "bucket": "桶", "objectId": "对象编号", "tag1": "标签一", "tag2": "标签二", "filename": "文件名", "md5": "md5", "entity": "关联对象", "entityId": "关联对象id", "extra1": "额外信息", "extra2": "非结构化额外信息", "extension": "后缀名", "size": "文件大小", "sort": "排序", "fileType": "文件类型", "isBridge": "是否桥接访问", "uploadState": "上传状态", "uploadMeta": "上传需要的metadata" }, "v": { "origin": { "qiniu": "七牛云", "wechat": "微信", "unknown": "未知" }, "type": { "image": "图像", "video": "视频", "audio": "音频", "file": "文件" }, "uploadState": { "success": "上传成功", "failed": "上传失败", "uploading": "上传中" } } }
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, boolean, {
|
||||
efPaths: string[];
|
||||
size: import("antd/es/button").ButtonSize | "mini";
|
||||
block: boolean | undefined;
|
||||
type: "primary" | "text" | "default" | "link" | "button" | "dashed" | "submit" | "reset" | undefined;
|
||||
size: string;
|
||||
block: boolean;
|
||||
type: string;
|
||||
executeText: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ export default function render(props: WebComponentProps<EntityDict, any, true, {
|
|||
executeText?: string;
|
||||
}, {
|
||||
upload: () => Promise<void>;
|
||||
}>): JSX.Element;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
|
|
|
|||
|
|
@ -10,4 +10,4 @@ export default function render(props: WebComponentProps<EntityDict, any, true, {
|
|||
executeText?: string;
|
||||
}, {
|
||||
upload: () => Promise<void>;
|
||||
}>): JSX.Element;
|
||||
}>): import("react/jsx-runtime").JSX.Element;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const antd_1 = require("antd");
|
|||
function render(props) {
|
||||
const { state, oakExecutable, oakExecuting, oakDirty, size, block, type, executeText } = props.data;
|
||||
const { t, upload, execute } = props.methods;
|
||||
const disabled = oakExecuting || ['uploading'].includes(state) || (oakExecutable === false && ['uploaded'].includes(state));
|
||||
const disabled = oakExecuting || ['uploading'].includes(state) || (oakExecutable !== true && ['uploaded'].includes(state));
|
||||
let text = executeText || t('common::action.confirm');
|
||||
if (oakExecuting) {
|
||||
text = t('executing', { text });
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|||
const antd_1 = require("antd");
|
||||
const icons_1 = require("@ant-design/icons");
|
||||
const web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
const imgBox_1 = tslib_1.__importDefault(require("oak-frontend-base/src/components/imgBox"));
|
||||
const imgBox_1 = tslib_1.__importDefault(require("oak-frontend-base/es/components/imgBox"));
|
||||
function render(props) {
|
||||
const { isModalOpen, isModalOpen1, renderImgs, src, bridgeUrl, selectedId, } = props.data;
|
||||
const { t, onModalConfirm, chooseMethod, closeModal1, closeModal, onModal1Confirm, setSelectedId } = props.methods;
|
||||
|
|
|
|||
|
|
@ -149,7 +149,8 @@ exports.default = OakComponent({
|
|||
extension,
|
||||
fileType,
|
||||
entityId,
|
||||
sort
|
||||
sort,
|
||||
uploadState: 'uploading',
|
||||
});
|
||||
this.features.extraFile2.addLocalFile(id, file);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import { EntityShape } from 'oak-domain/lib/types/Entity';
|
|||
export interface Schema extends EntityShape {
|
||||
origin: 'qiniu' | 'wechat' | 'unknown';
|
||||
type: 'image' | 'video' | 'audio' | 'file';
|
||||
bucket: String<16>;
|
||||
objectId: String<64>;
|
||||
bucket?: String<32>;
|
||||
objectId?: String<64>;
|
||||
tag1?: String<32>;
|
||||
tag2?: String<32>;
|
||||
filename: String<256>;
|
||||
|
|
@ -12,6 +12,7 @@ export interface Schema extends EntityShape {
|
|||
entity: String<32>;
|
||||
entityId: String<64>;
|
||||
extra1?: Text;
|
||||
extra2?: Object;
|
||||
extension?: String<16>;
|
||||
size?: Int<4>;
|
||||
sort?: Float<22, 10>;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ const entityDesc = {
|
|||
entity: '关联对象',
|
||||
entityId: '关联对象id',
|
||||
extra1: '额外信息',
|
||||
extra2: '非结构化额外信息',
|
||||
extension: '后缀名',
|
||||
size: '文件大小',
|
||||
sort: '排序',
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ import * as User from "../User/Schema";
|
|||
export type OpSchema = EntityShape & {
|
||||
origin: 'qiniu' | 'wechat' | 'unknown';
|
||||
type: 'image' | 'video' | 'audio' | 'file';
|
||||
bucket: String<16>;
|
||||
objectId: String<64>;
|
||||
bucket?: String<32> | null;
|
||||
objectId?: String<64> | null;
|
||||
tag1?: String<32> | null;
|
||||
tag2?: String<32> | null;
|
||||
filename: String<256>;
|
||||
|
|
@ -21,6 +21,7 @@ export type OpSchema = EntityShape & {
|
|||
entity: "article" | "articleMenu" | "sessionMessage" | "user" | string;
|
||||
entityId: String<64>;
|
||||
extra1?: Text | null;
|
||||
extra2?: Object | null;
|
||||
extension?: String<16> | null;
|
||||
size?: Int<4> | null;
|
||||
sort?: Float<22, 10> | null;
|
||||
|
|
@ -33,8 +34,8 @@ export type OpAttr = keyof OpSchema;
|
|||
export type Schema = EntityShape & {
|
||||
origin: 'qiniu' | 'wechat' | 'unknown';
|
||||
type: 'image' | 'video' | 'audio' | 'file';
|
||||
bucket: String<16>;
|
||||
objectId: String<64>;
|
||||
bucket?: String<32> | null;
|
||||
objectId?: String<64> | null;
|
||||
tag1?: String<32> | null;
|
||||
tag2?: String<32> | null;
|
||||
filename: String<256>;
|
||||
|
|
@ -42,6 +43,7 @@ export type Schema = EntityShape & {
|
|||
entity: "article" | "articleMenu" | "sessionMessage" | "user" | string;
|
||||
entityId: String<64>;
|
||||
extra1?: Text | null;
|
||||
extra2?: Object | null;
|
||||
extension?: String<16> | null;
|
||||
size?: Int<4> | null;
|
||||
sort?: Float<22, 10> | null;
|
||||
|
|
@ -72,6 +74,7 @@ type AttrFilter = {
|
|||
entity: Q_EnumValue<"article" | "articleMenu" | "sessionMessage" | "user" | string>;
|
||||
entityId: Q_StringValue;
|
||||
extra1: Q_StringValue;
|
||||
extra2: Object;
|
||||
extension: Q_StringValue;
|
||||
size: Q_NumberValue;
|
||||
sort: Q_NumberValue;
|
||||
|
|
@ -103,6 +106,7 @@ export type Projection = {
|
|||
entity?: number;
|
||||
entityId?: number;
|
||||
extra1?: number;
|
||||
extra2?: number | Object;
|
||||
extension?: number;
|
||||
size?: number;
|
||||
sort?: number;
|
||||
|
|
|
|||
|
|
@ -15,14 +15,12 @@ exports.desc = {
|
|||
enumeration: ["image", "video", "audio", "file"]
|
||||
},
|
||||
bucket: {
|
||||
notNull: true,
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 16
|
||||
length: 32
|
||||
}
|
||||
},
|
||||
objectId: {
|
||||
notNull: true,
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 64
|
||||
|
|
@ -68,6 +66,9 @@ exports.desc = {
|
|||
extra1: {
|
||||
type: "text"
|
||||
},
|
||||
extra2: {
|
||||
type: "object"
|
||||
},
|
||||
extension: {
|
||||
type: "varchar",
|
||||
params: {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{ "name": "文件", "attr": { "origin": "源", "type": "类型", "bucket": "桶", "objectId": "对象编号", "tag1": "标签一", "tag2": "标签二", "filename": "文件名", "md5": "md5", "entity": "关联对象", "entityId": "关联对象id", "extra1": "额外信息", "extension": "后缀名", "size": "文件大小", "sort": "排序", "fileType": "文件类型", "isBridge": "是否桥接访问", "uploadState": "上传状态", "uploadMeta": "上传需要的metadata" }, "v": { "origin": { "qiniu": "七牛云", "wechat": "微信", "unknown": "未知" }, "type": { "image": "图像", "video": "视频", "audio": "音频", "file": "文件" }, "uploadState": { "success": "上传成功", "failed": "上传失败", "uploading": "上传中" } } }
|
||||
{ "name": "文件", "attr": { "origin": "源", "type": "类型", "bucket": "桶", "objectId": "对象编号", "tag1": "标签一", "tag2": "标签二", "filename": "文件名", "md5": "md5", "entity": "关联对象", "entityId": "关联对象id", "extra1": "额外信息", "extra2": "非结构化额外信息", "extension": "后缀名", "size": "文件大小", "sort": "排序", "fileType": "文件类型", "isBridge": "是否桥接访问", "uploadState": "上传状态", "uploadMeta": "上传需要的metadata" }, "v": { "origin": { "qiniu": "七牛云", "wechat": "微信", "unknown": "未知" }, "type": { "image": "图像", "video": "视频", "audio": "音频", "file": "文件" }, "uploadState": { "success": "上传成功", "failed": "上传失败", "uploading": "上传中" } } }
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
"@types/sha1": "^1.1.3",
|
||||
"@types/uuid": "^8.3.0",
|
||||
"@types/wechat-miniprogram": "^3.4.3",
|
||||
"antd": "^5.9.0",
|
||||
"antd": "^5.8.3",
|
||||
"antd-mobile": "^5.32.0",
|
||||
"antd-mobile-icons": "^0.3.0",
|
||||
"assert": "^2.0.0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
import assert from 'assert';
|
||||
import { ButtonProps } from 'antd';
|
||||
import { ButtonProps as MobileButtonProps } from 'antd-mobile';
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
import { FileState } from '../../../features/extraFile2';
|
||||
|
||||
|
|
@ -29,9 +27,9 @@ export default OakComponent({
|
|||
},
|
||||
properties: {
|
||||
efPaths: [] as string[],
|
||||
size: 'middle' as ButtonProps['size'] | MobileButtonProps['size'],
|
||||
block: false as ButtonProps['block'] | MobileButtonProps['block'],
|
||||
type: 'primary' as ButtonProps['type'] | MobileButtonProps['type'],
|
||||
size: 'middle',
|
||||
block: false,
|
||||
type: 'primary',
|
||||
executeText: '',
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export default function render(props: WebComponentProps<EntityDict, any, true, {
|
|||
size, block, type, executeText } = props.data;
|
||||
const { t, upload, execute } = props.methods;
|
||||
|
||||
const disabled = oakExecuting || ['uploading'].includes(state) || (oakExecutable === false && ['uploaded'].includes(state));
|
||||
const disabled = oakExecuting || ['uploading'].includes(state) || (oakExecutable !== true && ['uploaded'].includes(state));
|
||||
let text = executeText || t('common::action.confirm');
|
||||
if (oakExecuting) {
|
||||
text = t('executing', { text });
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { PlusOutlined } from "@ant-design/icons";
|
|||
import Style from "./web.module.less";
|
||||
import { WebComponentProps } from "oak-frontend-base";
|
||||
import { EntityDict } from "../../../oak-app-domain";
|
||||
import ImgBox from "oak-frontend-base/src/components/imgBox"
|
||||
import ImgBox from "oak-frontend-base/es/components/imgBox";
|
||||
|
||||
type MethodsType = 'original' | 'url' | 'uploadLocalImg';
|
||||
|
||||
|
|
|
|||
|
|
@ -182,7 +182,8 @@ export default OakComponent({
|
|||
extension,
|
||||
fileType,
|
||||
entityId,
|
||||
sort
|
||||
sort,
|
||||
uploadState: 'uploading',
|
||||
});
|
||||
this.features.extraFile2.addLocalFile(id, file);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import { EntityDesc } from 'oak-domain/lib/types/EntityDesc';
|
|||
export interface Schema extends EntityShape {
|
||||
origin: 'qiniu' | 'wechat' | 'unknown';
|
||||
type: 'image' | 'video' | 'audio' | 'file';
|
||||
bucket: String<16>;
|
||||
objectId: String<64>;
|
||||
bucket?: String<32>;
|
||||
objectId?: String<64>;
|
||||
tag1?: String<32>;
|
||||
tag2?: String<32>;
|
||||
filename: String<256>;
|
||||
|
|
@ -14,6 +14,7 @@ export interface Schema extends EntityShape {
|
|||
entity: String<32>;
|
||||
entityId: String<64>;
|
||||
extra1?: Text;
|
||||
extra2?: Object;
|
||||
extension?: String<16>;
|
||||
size?: Int<4>;
|
||||
sort?: Float<22, 10>;
|
||||
|
|
@ -43,6 +44,7 @@ const entityDesc: EntityDesc<Schema, '', '', {
|
|||
entity: '关联对象',
|
||||
entityId: '关联对象id',
|
||||
extra1: '额外信息',
|
||||
extra2: '非结构化额外信息',
|
||||
extension: '后缀名',
|
||||
size: '文件大小',
|
||||
sort: '排序',
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import * as User from "../User/Schema";
|
|||
export type OpSchema = EntityShape & {
|
||||
origin: 'qiniu' | 'wechat' | 'unknown';
|
||||
type: 'image' | 'video' | 'audio' | 'file';
|
||||
bucket: String<16>;
|
||||
objectId: String<64>;
|
||||
bucket?: String<32> | null;
|
||||
objectId?: String<64> | null;
|
||||
tag1?: String<32> | null;
|
||||
tag2?: String<32> | null;
|
||||
filename: String<256>;
|
||||
|
|
@ -22,6 +22,7 @@ export type OpSchema = EntityShape & {
|
|||
entity: "article" | "articleMenu" | "sessionMessage" | "user" | string;
|
||||
entityId: String<64>;
|
||||
extra1?: Text | null;
|
||||
extra2?: Object | null;
|
||||
extension?: String<16> | null;
|
||||
size?: Int<4> | null;
|
||||
sort?: Float<22, 10> | null;
|
||||
|
|
@ -34,8 +35,8 @@ export type OpAttr = keyof OpSchema;
|
|||
export type Schema = EntityShape & {
|
||||
origin: 'qiniu' | 'wechat' | 'unknown';
|
||||
type: 'image' | 'video' | 'audio' | 'file';
|
||||
bucket: String<16>;
|
||||
objectId: String<64>;
|
||||
bucket?: String<32> | null;
|
||||
objectId?: String<64> | null;
|
||||
tag1?: String<32> | null;
|
||||
tag2?: String<32> | null;
|
||||
filename: String<256>;
|
||||
|
|
@ -43,6 +44,7 @@ export type Schema = EntityShape & {
|
|||
entity: "article" | "articleMenu" | "sessionMessage" | "user" | string;
|
||||
entityId: String<64>;
|
||||
extra1?: Text | null;
|
||||
extra2?: Object | null;
|
||||
extension?: String<16> | null;
|
||||
size?: Int<4> | null;
|
||||
sort?: Float<22, 10> | null;
|
||||
|
|
@ -73,6 +75,7 @@ type AttrFilter = {
|
|||
entity: Q_EnumValue<"article" | "articleMenu" | "sessionMessage" | "user" | string>;
|
||||
entityId: Q_StringValue;
|
||||
extra1: Q_StringValue;
|
||||
extra2: Object;
|
||||
extension: Q_StringValue;
|
||||
size: Q_NumberValue;
|
||||
sort: Q_NumberValue;
|
||||
|
|
@ -104,6 +107,7 @@ export type Projection = {
|
|||
entity?: number;
|
||||
entityId?: number;
|
||||
extra1?: number;
|
||||
extra2?: number | Object;
|
||||
extension?: number;
|
||||
size?: number;
|
||||
sort?: number;
|
||||
|
|
|
|||
|
|
@ -14,14 +14,12 @@ export const desc: StorageDesc<OpSchema> = {
|
|||
enumeration: ["image", "video", "audio", "file"]
|
||||
},
|
||||
bucket: {
|
||||
notNull: true,
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 16
|
||||
length: 32
|
||||
}
|
||||
},
|
||||
objectId: {
|
||||
notNull: true,
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 64
|
||||
|
|
@ -67,6 +65,9 @@ export const desc: StorageDesc<OpSchema> = {
|
|||
extra1: {
|
||||
type: "text"
|
||||
},
|
||||
extra2: {
|
||||
type: "object"
|
||||
},
|
||||
extension: {
|
||||
type: "varchar",
|
||||
params: {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"name":"文件","attr":{"origin":"源","type":"类型","bucket":"桶","objectId":"对象编号","tag1":"标签一","tag2":"标签二","filename":"文件名","md5":"md5","entity":"关联对象","entityId":"关联对象id","extra1":"额外信息","extension":"后缀名","size":"文件大小","sort":"排序","fileType":"文件类型","isBridge":"是否桥接访问","uploadState":"上传状态","uploadMeta":"上传需要的metadata"},"v":{"origin":{"qiniu":"七牛云","wechat":"微信","unknown":"未知"},"type":{"image":"图像","video":"视频","audio":"音频","file":"文件"},"uploadState":{"success":"上传成功","failed":"上传失败","uploading":"上传中"}}}
|
||||
{"name":"文件","attr":{"origin":"源","type":"类型","bucket":"桶","objectId":"对象编号","tag1":"标签一","tag2":"标签二","filename":"文件名","md5":"md5","entity":"关联对象","entityId":"关联对象id","extra1":"额外信息","extra2":"非结构化额外信息","extension":"后缀名","size":"文件大小","sort":"排序","fileType":"文件类型","isBridge":"是否桥接访问","uploadState":"上传状态","uploadMeta":"上传需要的metadata"},"v":{"origin":{"qiniu":"七牛云","wechat":"微信","unknown":"未知"},"type":{"image":"图像","video":"视频","audio":"音频","file":"文件"},"uploadState":{"success":"上传成功","failed":"上传失败","uploading":"上传中"}}}
|
||||
Loading…
Reference in New Issue