新增 userentitygrant wechatqrcode

This commit is contained in:
Wang Kejun 2022-05-20 17:31:42 +08:00
parent 7298c4621d
commit 9d3016e737
6 changed files with 136 additions and 2 deletions

View File

@ -0,0 +1,23 @@
import { checkFilterContains } from 'oak-domain/lib/store/actionDef';
import {
Checker,
} from 'oak-domain/lib/types';
import { EntityDict } from 'oak-app-domain';
import { GeneralRuntimeContext } from '../RuntimeContext';
const checkers: Checker<
EntityDict,
'userEntityGrant',
GeneralRuntimeContext<EntityDict>
>[] = [
{
type: 'data',
action: 'create',
entity: 'userEntityGrant',
checker: async ({ operation }, context) => {
return 0;
},
},
];
export default checkers;

23
src/checkers/wechatQrCode Normal file
View File

@ -0,0 +1,23 @@
import { checkFilterContains } from 'oak-domain/lib/store/actionDef';
import {
Checker,
} from 'oak-domain/lib/types';
import { EntityDict } from 'oak-app-domain';
import { GeneralRuntimeContext } from '../RuntimeContext';
const checkers: Checker<
EntityDict,
'wechatQrCode',
GeneralRuntimeContext<EntityDict>
>[] = [
{
type: 'data',
action: 'create',
entity: 'wechatQrCode',
checker: async ({ operation }, context) => {
return 0;
},
},
];
export default checkers;

View File

@ -0,0 +1,39 @@
import { String, Text } from 'oak-domain/lib/types/DataType';
import { EntityShape } from 'oak-domain/lib/types/Entity';
import { Index } from 'oak-domain/lib/types/Storage';
import { Schema as User } from './User';
export interface Schema extends EntityShape {
entity: String<32>;
entityId: String<64>;
relation: String<32>;
action: String<32>;
remark?: Text;
uuid: String<32>;
granter: User;
grantee?: User;
}
const indexes: Index<Schema>[] = [
{
name: 'index_entity_entityId',
attributes: [
{
name: 'entity',
},
{
name: 'entityId',
},
],
},
{
name: 'index_uuid',
attributes: [
{
name: 'uuid',
},
],
},
];

View File

@ -0,0 +1,49 @@
import { String, Text, Datetime, Boolean } from 'oak-domain/lib/types/DataType';
import { EntityShape } from 'oak-domain/lib/types/Entity';
import { Index } from 'oak-domain/lib/types/Storage';
export interface Schema extends EntityShape {
entity: String<32>;
entityId: String<64>;
type?: String<32>; //类型
expiresAt: Datetime; // 过期时间
expired: Boolean; //是否过期
autoExtend: Boolean;
sceneStr?: Text;
ticket?: Text;
url: String<64>;
isPermanent: Boolean; //是否永久码
}
const indexes: Index<Schema>[] = [
{
name: 'index_entity_entityId',
attributes: [
{
name: 'entity',
},
{
name: 'entityId',
},
],
},
{
name: 'index_expired_expiresAt',
attributes: [
{
name: 'expired',
},
{
name: 'expiresAt',
},
],
},
{
name: 'index_url',
attributes: [
{
name: 'url',
},
],
},
];

View File

@ -6,7 +6,7 @@ Component({
// 根据 size 不同,计算的图片显示大小不同
itemSizePercentage: '',
},
externalClasses: ['l-container-class', 'l-item-class'],
externalClasses: ['l-class', 'l-item-class'],
properties: {
oakFullpath: String,
oakUpdateData: Object,

View File

@ -1,4 +1,4 @@
<view class="file-list__container l-container-class">
<view class="file-list__container l-class">
<block wx:for="{{oakValue}}" wx:key="index">
<view
class="file-list__item file-list__item--{{size}} l-item-class"