@aiao/rxdb-test 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities/FileLarge.d.ts +339 -0
- package/dist/entities/FileLarge.js +77 -0
- package/dist/entities/FileNode.d.ts +335 -0
- package/dist/entities/FileNode.js +77 -0
- package/dist/entities/MenuLarge.d.ts +294 -0
- package/dist/entities/MenuLarge.js +41 -0
- package/dist/entities/MenuSimple.d.ts +290 -0
- package/dist/entities/MenuSimple.js +41 -0
- package/dist/entities/Todo.d.ts +165 -0
- package/dist/entities/Todo.js +34 -0
- package/dist/entities/TypeDemo.d.ts +264 -0
- package/dist/entities/TypeDemo.js +101 -0
- package/dist/entities/index.d.ts +14 -1655
- package/dist/entities/index.js +6 -360
- package/dist/graph/index.d.ts +1 -2
- package/dist/graph/index.js +1 -1
- package/dist/shop/Attribute.d.ts +359 -0
- package/dist/shop/Attribute.js +50 -0
- package/dist/shop/AttributeValue.d.ts +366 -0
- package/dist/shop/AttributeValue.js +51 -0
- package/dist/shop/Category.d.ts +280 -0
- package/dist/shop/Category.js +41 -0
- package/dist/shop/IdCard.d.ts +237 -0
- package/dist/shop/IdCard.js +43 -0
- package/dist/shop/Order.d.ts +270 -0
- package/dist/shop/Order.js +58 -0
- package/dist/shop/OrderItem.d.ts +293 -0
- package/dist/shop/OrderItem.js +64 -0
- package/dist/shop/Product.d.ts +321 -0
- package/dist/shop/Product.js +47 -0
- package/dist/shop/SKU.d.ts +343 -0
- package/dist/shop/SKU.js +63 -0
- package/dist/shop/SKUAttributes.d.ts +306 -0
- package/dist/shop/SKUAttributes.js +56 -0
- package/dist/shop/User.d.ts +269 -0
- package/dist/shop/User.js +74 -0
- package/dist/shop/index.d.ts +22 -2980
- package/dist/shop/index.js +10 -528
- package/dist/system/RxDBBranch.d.ts +396 -0
- package/dist/system/RxDBBranch.js +106 -0
- package/dist/system/RxDBChange.d.ts +361 -0
- package/dist/system/RxDBChange.js +123 -0
- package/dist/system/RxDBMigration.d.ts +167 -0
- package/dist/system/RxDBMigration.js +40 -0
- package/dist/system/RxDBSync.d.ts +339 -0
- package/dist/system/RxDBSync.js +122 -0
- package/dist/system/index.d.ts +9 -1240
- package/dist/system/index.js +4 -384
- package/package.json +3 -3
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
import { CountOptions, DateRules, ENTITY_STATIC_TYPES, EntityBase, EntityType, FindAllOptions, FindByCursorOptions, FindOneOptions, FindOneOrFailOptions, FindOptions, IEntity, ITreeEntity, NumberRules, RelationDateRules, RelationEntitiesObservable, RelationEntityObservable, RelationExistsRules, RelationNumberRules, RelationStringRules, RelationUUIDRules, RuleGroupBase, StringRules, UUID, UUIDRules } from '@aiao/rxdb';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* rule
|
|
6
|
+
*/
|
|
7
|
+
declare type AttributeValueRule = UUIDRules<AttributeValue, 'id'>
|
|
8
|
+
| DateRules<AttributeValue, 'createdAt'>
|
|
9
|
+
| DateRules<AttributeValue, 'updatedAt'>
|
|
10
|
+
| StringRules<AttributeValue, 'createdBy'>
|
|
11
|
+
| StringRules<AttributeValue, 'updatedBy'>
|
|
12
|
+
| StringRules<AttributeValue, 'name'>
|
|
13
|
+
| UUIDRules<AttributeValue, 'attributeId'>
|
|
14
|
+
| RelationExistsRules<'attribute', AttributeRuleGroup>
|
|
15
|
+
| RelationUUIDRules<'attribute.id', UUID>
|
|
16
|
+
| RelationDateRules<'attribute.createdAt', Date>
|
|
17
|
+
| RelationDateRules<'attribute.updatedAt', Date>
|
|
18
|
+
| RelationStringRules<'attribute.createdBy', string | null>
|
|
19
|
+
| RelationStringRules<'attribute.updatedBy', string | null>
|
|
20
|
+
| RelationStringRules<'attribute.name', string>
|
|
21
|
+
| RelationUUIDRules<'attribute.skuAttributes.id', UUID>
|
|
22
|
+
| RelationDateRules<'attribute.skuAttributes.createdAt', Date>
|
|
23
|
+
| RelationDateRules<'attribute.skuAttributes.updatedAt', Date>
|
|
24
|
+
| RelationStringRules<'attribute.skuAttributes.createdBy', string | null>
|
|
25
|
+
| RelationStringRules<'attribute.skuAttributes.updatedBy', string | null>
|
|
26
|
+
| UUIDRules<SKUAttributes, 'skuId'>
|
|
27
|
+
| UUIDRules<SKUAttributes, 'attributeId'>
|
|
28
|
+
| UUIDRules<SKUAttributes, 'valueId'>
|
|
29
|
+
| RelationUUIDRules<'attribute.skuAttributes.sku.id', UUID>
|
|
30
|
+
| RelationDateRules<'attribute.skuAttributes.sku.createdAt', Date>
|
|
31
|
+
| RelationDateRules<'attribute.skuAttributes.sku.updatedAt', Date>
|
|
32
|
+
| RelationStringRules<'attribute.skuAttributes.sku.createdBy', string | null>
|
|
33
|
+
| RelationStringRules<'attribute.skuAttributes.sku.updatedBy', string | null>
|
|
34
|
+
| RelationStringRules<'attribute.skuAttributes.sku.code', string>
|
|
35
|
+
| RelationNumberRules<'attribute.skuAttributes.sku.price', number>
|
|
36
|
+
| RelationNumberRules<'attribute.skuAttributes.sku.stock', number>
|
|
37
|
+
| UUIDRules<SKU, 'productId'>
|
|
38
|
+
| RelationUUIDRules<'attribute.skuAttributes.sku.attributes.id', UUID>
|
|
39
|
+
| RelationDateRules<'attribute.skuAttributes.sku.attributes.createdAt', Date>
|
|
40
|
+
| RelationDateRules<'attribute.skuAttributes.sku.attributes.updatedAt', Date>
|
|
41
|
+
| RelationStringRules<'attribute.skuAttributes.sku.attributes.createdBy', string | null>
|
|
42
|
+
| RelationStringRules<'attribute.skuAttributes.sku.attributes.updatedBy', string | null>
|
|
43
|
+
| RelationUUIDRules<'attribute.skuAttributes.sku.product.id', UUID>
|
|
44
|
+
| RelationDateRules<'attribute.skuAttributes.sku.product.createdAt', Date>
|
|
45
|
+
| RelationDateRules<'attribute.skuAttributes.sku.product.updatedAt', Date>
|
|
46
|
+
| RelationStringRules<'attribute.skuAttributes.sku.product.createdBy', string | null>
|
|
47
|
+
| RelationStringRules<'attribute.skuAttributes.sku.product.updatedBy', string | null>
|
|
48
|
+
| RelationStringRules<'attribute.skuAttributes.sku.product.name', string>
|
|
49
|
+
| RelationStringRules<'attribute.skuAttributes.sku.product.description', string | null>
|
|
50
|
+
| RelationUUIDRules<'attribute.skuAttributes.sku.product.skus.id', UUID>
|
|
51
|
+
| RelationDateRules<'attribute.skuAttributes.sku.product.skus.createdAt', Date>
|
|
52
|
+
| RelationDateRules<'attribute.skuAttributes.sku.product.skus.updatedAt', Date>
|
|
53
|
+
| RelationStringRules<'attribute.skuAttributes.sku.product.skus.createdBy', string | null>
|
|
54
|
+
| RelationStringRules<'attribute.skuAttributes.sku.product.skus.updatedBy', string | null>
|
|
55
|
+
| RelationStringRules<'attribute.skuAttributes.sku.product.skus.code', string>
|
|
56
|
+
| RelationNumberRules<'attribute.skuAttributes.sku.product.skus.price', number>
|
|
57
|
+
| RelationNumberRules<'attribute.skuAttributes.sku.product.skus.stock', number>
|
|
58
|
+
| RelationExistsRules<'skuAttributeValues', SKUAttributesRuleGroup>
|
|
59
|
+
| RelationUUIDRules<'skuAttributeValues.id', UUID>
|
|
60
|
+
| RelationDateRules<'skuAttributeValues.createdAt', Date>
|
|
61
|
+
| RelationDateRules<'skuAttributeValues.updatedAt', Date>
|
|
62
|
+
| RelationStringRules<'skuAttributeValues.createdBy', string | null>
|
|
63
|
+
| RelationStringRules<'skuAttributeValues.updatedBy', string | null>
|
|
64
|
+
| RelationUUIDRules<'skuAttributeValues.sku.id', UUID>
|
|
65
|
+
| RelationDateRules<'skuAttributeValues.sku.createdAt', Date>
|
|
66
|
+
| RelationDateRules<'skuAttributeValues.sku.updatedAt', Date>
|
|
67
|
+
| RelationStringRules<'skuAttributeValues.sku.createdBy', string | null>
|
|
68
|
+
| RelationStringRules<'skuAttributeValues.sku.updatedBy', string | null>
|
|
69
|
+
| RelationStringRules<'skuAttributeValues.sku.code', string>
|
|
70
|
+
| RelationNumberRules<'skuAttributeValues.sku.price', number>
|
|
71
|
+
| RelationNumberRules<'skuAttributeValues.sku.stock', number>
|
|
72
|
+
| RelationUUIDRules<'skuAttributeValues.sku.attributes.id', UUID>
|
|
73
|
+
| RelationDateRules<'skuAttributeValues.sku.attributes.createdAt', Date>
|
|
74
|
+
| RelationDateRules<'skuAttributeValues.sku.attributes.updatedAt', Date>
|
|
75
|
+
| RelationStringRules<'skuAttributeValues.sku.attributes.createdBy', string | null>
|
|
76
|
+
| RelationStringRules<'skuAttributeValues.sku.attributes.updatedBy', string | null>
|
|
77
|
+
| RelationUUIDRules<'skuAttributeValues.sku.product.id', UUID>
|
|
78
|
+
| RelationDateRules<'skuAttributeValues.sku.product.createdAt', Date>
|
|
79
|
+
| RelationDateRules<'skuAttributeValues.sku.product.updatedAt', Date>
|
|
80
|
+
| RelationStringRules<'skuAttributeValues.sku.product.createdBy', string | null>
|
|
81
|
+
| RelationStringRules<'skuAttributeValues.sku.product.updatedBy', string | null>
|
|
82
|
+
| RelationStringRules<'skuAttributeValues.sku.product.name', string>
|
|
83
|
+
| RelationStringRules<'skuAttributeValues.sku.product.description', string | null>
|
|
84
|
+
| RelationUUIDRules<'skuAttributeValues.sku.product.skus.id', UUID>
|
|
85
|
+
| RelationDateRules<'skuAttributeValues.sku.product.skus.createdAt', Date>
|
|
86
|
+
| RelationDateRules<'skuAttributeValues.sku.product.skus.updatedAt', Date>
|
|
87
|
+
| RelationStringRules<'skuAttributeValues.sku.product.skus.createdBy', string | null>
|
|
88
|
+
| RelationStringRules<'skuAttributeValues.sku.product.skus.updatedBy', string | null>
|
|
89
|
+
| RelationStringRules<'skuAttributeValues.sku.product.skus.code', string>
|
|
90
|
+
| RelationNumberRules<'skuAttributeValues.sku.product.skus.price', number>
|
|
91
|
+
| RelationNumberRules<'skuAttributeValues.sku.product.skus.stock', number>
|
|
92
|
+
| RelationUUIDRules<'skuAttributeValues.attribute.id', UUID>
|
|
93
|
+
| RelationDateRules<'skuAttributeValues.attribute.createdAt', Date>
|
|
94
|
+
| RelationDateRules<'skuAttributeValues.attribute.updatedAt', Date>
|
|
95
|
+
| RelationStringRules<'skuAttributeValues.attribute.createdBy', string | null>
|
|
96
|
+
| RelationStringRules<'skuAttributeValues.attribute.updatedBy', string | null>
|
|
97
|
+
| RelationStringRules<'skuAttributeValues.attribute.name', string>
|
|
98
|
+
| RelationUUIDRules<'skuAttributeValues.attribute.skuAttributes.id', UUID>
|
|
99
|
+
| RelationDateRules<'skuAttributeValues.attribute.skuAttributes.createdAt', Date>
|
|
100
|
+
| RelationDateRules<'skuAttributeValues.attribute.skuAttributes.updatedAt', Date>
|
|
101
|
+
| RelationStringRules<'skuAttributeValues.attribute.skuAttributes.createdBy', string | null>
|
|
102
|
+
| RelationStringRules<'skuAttributeValues.attribute.skuAttributes.updatedBy', string | null>;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* RuleGroupBase
|
|
106
|
+
*/
|
|
107
|
+
export declare type AttributeValueRuleGroup = RuleGroupBase<typeof AttributeValue,
|
|
108
|
+
|'id'
|
|
109
|
+
|'createdAt'
|
|
110
|
+
|'updatedAt'
|
|
111
|
+
|'createdBy'
|
|
112
|
+
|'updatedBy'
|
|
113
|
+
|'name'
|
|
114
|
+
|'attributeId'
|
|
115
|
+
|'attribute'
|
|
116
|
+
|'attribute.id'
|
|
117
|
+
|'attribute.createdAt'
|
|
118
|
+
|'attribute.updatedAt'
|
|
119
|
+
|'attribute.createdBy'
|
|
120
|
+
|'attribute.updatedBy'
|
|
121
|
+
|'attribute.name'
|
|
122
|
+
|'attribute.skuAttributes.id'
|
|
123
|
+
|'attribute.skuAttributes.createdAt'
|
|
124
|
+
|'attribute.skuAttributes.updatedAt'
|
|
125
|
+
|'attribute.skuAttributes.createdBy'
|
|
126
|
+
|'attribute.skuAttributes.updatedBy'
|
|
127
|
+
|'skuId'
|
|
128
|
+
|'attributeId'
|
|
129
|
+
|'valueId'
|
|
130
|
+
|'attribute.skuAttributes.sku.id'
|
|
131
|
+
|'attribute.skuAttributes.sku.createdAt'
|
|
132
|
+
|'attribute.skuAttributes.sku.updatedAt'
|
|
133
|
+
|'attribute.skuAttributes.sku.createdBy'
|
|
134
|
+
|'attribute.skuAttributes.sku.updatedBy'
|
|
135
|
+
|'attribute.skuAttributes.sku.code'
|
|
136
|
+
|'attribute.skuAttributes.sku.price'
|
|
137
|
+
|'attribute.skuAttributes.sku.stock'
|
|
138
|
+
|'productId'
|
|
139
|
+
|'attribute.skuAttributes.sku.attributes.id'
|
|
140
|
+
|'attribute.skuAttributes.sku.attributes.createdAt'
|
|
141
|
+
|'attribute.skuAttributes.sku.attributes.updatedAt'
|
|
142
|
+
|'attribute.skuAttributes.sku.attributes.createdBy'
|
|
143
|
+
|'attribute.skuAttributes.sku.attributes.updatedBy'
|
|
144
|
+
|'skuId'
|
|
145
|
+
|'attributeId'
|
|
146
|
+
|'valueId'
|
|
147
|
+
|'attribute.skuAttributes.sku.product.id'
|
|
148
|
+
|'attribute.skuAttributes.sku.product.createdAt'
|
|
149
|
+
|'attribute.skuAttributes.sku.product.updatedAt'
|
|
150
|
+
|'attribute.skuAttributes.sku.product.createdBy'
|
|
151
|
+
|'attribute.skuAttributes.sku.product.updatedBy'
|
|
152
|
+
|'attribute.skuAttributes.sku.product.name'
|
|
153
|
+
|'attribute.skuAttributes.sku.product.description'
|
|
154
|
+
|'attribute.skuAttributes.sku.product.skus.id'
|
|
155
|
+
|'attribute.skuAttributes.sku.product.skus.createdAt'
|
|
156
|
+
|'attribute.skuAttributes.sku.product.skus.updatedAt'
|
|
157
|
+
|'attribute.skuAttributes.sku.product.skus.createdBy'
|
|
158
|
+
|'attribute.skuAttributes.sku.product.skus.updatedBy'
|
|
159
|
+
|'attribute.skuAttributes.sku.product.skus.code'
|
|
160
|
+
|'attribute.skuAttributes.sku.product.skus.price'
|
|
161
|
+
|'attribute.skuAttributes.sku.product.skus.stock'
|
|
162
|
+
|'productId'
|
|
163
|
+
|'skuAttributeValues'
|
|
164
|
+
|'skuAttributeValues.id'
|
|
165
|
+
|'skuAttributeValues.createdAt'
|
|
166
|
+
|'skuAttributeValues.updatedAt'
|
|
167
|
+
|'skuAttributeValues.createdBy'
|
|
168
|
+
|'skuAttributeValues.updatedBy'
|
|
169
|
+
|'skuId'
|
|
170
|
+
|'attributeId'
|
|
171
|
+
|'valueId'
|
|
172
|
+
|'skuAttributeValues.sku.id'
|
|
173
|
+
|'skuAttributeValues.sku.createdAt'
|
|
174
|
+
|'skuAttributeValues.sku.updatedAt'
|
|
175
|
+
|'skuAttributeValues.sku.createdBy'
|
|
176
|
+
|'skuAttributeValues.sku.updatedBy'
|
|
177
|
+
|'skuAttributeValues.sku.code'
|
|
178
|
+
|'skuAttributeValues.sku.price'
|
|
179
|
+
|'skuAttributeValues.sku.stock'
|
|
180
|
+
|'productId'
|
|
181
|
+
|'skuAttributeValues.sku.attributes.id'
|
|
182
|
+
|'skuAttributeValues.sku.attributes.createdAt'
|
|
183
|
+
|'skuAttributeValues.sku.attributes.updatedAt'
|
|
184
|
+
|'skuAttributeValues.sku.attributes.createdBy'
|
|
185
|
+
|'skuAttributeValues.sku.attributes.updatedBy'
|
|
186
|
+
|'skuId'
|
|
187
|
+
|'attributeId'
|
|
188
|
+
|'valueId'
|
|
189
|
+
|'skuAttributeValues.sku.product.id'
|
|
190
|
+
|'skuAttributeValues.sku.product.createdAt'
|
|
191
|
+
|'skuAttributeValues.sku.product.updatedAt'
|
|
192
|
+
|'skuAttributeValues.sku.product.createdBy'
|
|
193
|
+
|'skuAttributeValues.sku.product.updatedBy'
|
|
194
|
+
|'skuAttributeValues.sku.product.name'
|
|
195
|
+
|'skuAttributeValues.sku.product.description'
|
|
196
|
+
|'skuAttributeValues.sku.product.skus.id'
|
|
197
|
+
|'skuAttributeValues.sku.product.skus.createdAt'
|
|
198
|
+
|'skuAttributeValues.sku.product.skus.updatedAt'
|
|
199
|
+
|'skuAttributeValues.sku.product.skus.createdBy'
|
|
200
|
+
|'skuAttributeValues.sku.product.skus.updatedBy'
|
|
201
|
+
|'skuAttributeValues.sku.product.skus.code'
|
|
202
|
+
|'skuAttributeValues.sku.product.skus.price'
|
|
203
|
+
|'skuAttributeValues.sku.product.skus.stock'
|
|
204
|
+
|'productId'
|
|
205
|
+
|'skuAttributeValues.attribute.id'
|
|
206
|
+
|'skuAttributeValues.attribute.createdAt'
|
|
207
|
+
|'skuAttributeValues.attribute.updatedAt'
|
|
208
|
+
|'skuAttributeValues.attribute.createdBy'
|
|
209
|
+
|'skuAttributeValues.attribute.updatedBy'
|
|
210
|
+
|'skuAttributeValues.attribute.name'
|
|
211
|
+
|'skuAttributeValues.attribute.skuAttributes.id'
|
|
212
|
+
|'skuAttributeValues.attribute.skuAttributes.createdAt'
|
|
213
|
+
|'skuAttributeValues.attribute.skuAttributes.updatedAt'
|
|
214
|
+
|'skuAttributeValues.attribute.skuAttributes.createdBy'
|
|
215
|
+
|'skuAttributeValues.attribute.skuAttributes.updatedBy'
|
|
216
|
+
|'skuId'
|
|
217
|
+
|'attributeId'
|
|
218
|
+
|'valueId',
|
|
219
|
+
AttributeValueRule>;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* OrderByField
|
|
223
|
+
*/
|
|
224
|
+
declare type AttributeValueOrderByField = "id" | "createdAt" | "updatedAt" | "createdBy" | "updatedBy" | "name";
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* 静态类型
|
|
228
|
+
*/
|
|
229
|
+
export interface AttributeValueStaticTypes {
|
|
230
|
+
/**
|
|
231
|
+
* id 类型
|
|
232
|
+
*/
|
|
233
|
+
idType: UUID;
|
|
234
|
+
/**
|
|
235
|
+
* 查询选项
|
|
236
|
+
*/
|
|
237
|
+
getOptions: UUID;
|
|
238
|
+
/**
|
|
239
|
+
* 查询选项
|
|
240
|
+
*/
|
|
241
|
+
findOneOrFailOptions: FindOneOrFailOptions<typeof AttributeValue,AttributeValueRuleGroup,AttributeValueOrderByField>;
|
|
242
|
+
/**
|
|
243
|
+
* 查询选项
|
|
244
|
+
*/
|
|
245
|
+
findOptions: FindOptions<typeof AttributeValue,AttributeValueRuleGroup,AttributeValueOrderByField>;
|
|
246
|
+
/**
|
|
247
|
+
* 查询选项
|
|
248
|
+
*/
|
|
249
|
+
findOneOptions: FindOneOptions<typeof AttributeValue,AttributeValueRuleGroup,AttributeValueOrderByField>;
|
|
250
|
+
/**
|
|
251
|
+
* 查询选项
|
|
252
|
+
*/
|
|
253
|
+
findAllOptions: FindAllOptions<typeof AttributeValue,AttributeValueRuleGroup,AttributeValueOrderByField>;
|
|
254
|
+
/**
|
|
255
|
+
* 查询选项
|
|
256
|
+
*/
|
|
257
|
+
findByCursorOptions: FindByCursorOptions<typeof AttributeValue,AttributeValueRuleGroup,AttributeValueOrderByField>;
|
|
258
|
+
/**
|
|
259
|
+
* 查询选项
|
|
260
|
+
*/
|
|
261
|
+
countOptions: CountOptions<typeof AttributeValue,AttributeValueRuleGroup>;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* 初始化数据
|
|
266
|
+
*/
|
|
267
|
+
export interface AttributeValueInitData {
|
|
268
|
+
/**
|
|
269
|
+
* 属性值名称
|
|
270
|
+
*/
|
|
271
|
+
name?: string;
|
|
272
|
+
/**
|
|
273
|
+
* 所属属性 id
|
|
274
|
+
*/
|
|
275
|
+
attributeId?: UUID;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* 属性值
|
|
280
|
+
*/
|
|
281
|
+
export declare class AttributeValue extends EntityBase implements IEntity {
|
|
282
|
+
static [ENTITY_STATIC_TYPES]: AttributeValueStaticTypes;
|
|
283
|
+
/**
|
|
284
|
+
* 所属属性
|
|
285
|
+
*/
|
|
286
|
+
readonly attribute$: RelationEntityObservable<typeof Attribute>;
|
|
287
|
+
/**
|
|
288
|
+
* SKU属性值关联
|
|
289
|
+
*/
|
|
290
|
+
readonly skuAttributeValues$: RelationEntitiesObservable<SKUAttributes>;
|
|
291
|
+
/**
|
|
292
|
+
* 所属属性 id
|
|
293
|
+
*/
|
|
294
|
+
attributeId: UUID;
|
|
295
|
+
/**
|
|
296
|
+
* 属性值名称
|
|
297
|
+
*/
|
|
298
|
+
name: string;
|
|
299
|
+
/**
|
|
300
|
+
* 初始化数据
|
|
301
|
+
* @param initData 初始化数据
|
|
302
|
+
*/
|
|
303
|
+
constructor(initData?: AttributeValueInitData);
|
|
304
|
+
/**
|
|
305
|
+
* 统计实体数量
|
|
306
|
+
* @param options 查询选项
|
|
307
|
+
* @example
|
|
308
|
+
* AttributeValue.count({ where: { combinator: 'and', rules: [] } }).subscribe(total => console.log(total));
|
|
309
|
+
*/
|
|
310
|
+
static count(options: CountOptions<typeof AttributeValue,AttributeValueRuleGroup>): Observable<number>;
|
|
311
|
+
/**
|
|
312
|
+
* 查询多个实体
|
|
313
|
+
* @param options 查询选项
|
|
314
|
+
* @example
|
|
315
|
+
* AttributeValue.find({ where: { combinator: 'and', rules: [] }] }).subscribe(list => console.log(list));
|
|
316
|
+
*/
|
|
317
|
+
static find(options: FindOptions<typeof AttributeValue,AttributeValueRuleGroup,AttributeValueOrderByField>): Observable<AttributeValue[]>;
|
|
318
|
+
/**
|
|
319
|
+
* 查询所有实体
|
|
320
|
+
* @param options 查询选项
|
|
321
|
+
* @example
|
|
322
|
+
* AttributeValue.findAll({ where: { combinator: 'and', rules: [] } }).subscribe(list => console.log(list));
|
|
323
|
+
*/
|
|
324
|
+
static findAll(options: FindAllOptions<typeof AttributeValue,AttributeValueRuleGroup,AttributeValueOrderByField>): Observable<AttributeValue[]>;
|
|
325
|
+
/**
|
|
326
|
+
* 游标分页查询
|
|
327
|
+
* @param options 查询选项
|
|
328
|
+
* @example
|
|
329
|
+
* AttributeValue.findByCursor({ where: { combinator: 'and', rules: [] } }).subscribe(list => console.log(list));
|
|
330
|
+
*/
|
|
331
|
+
static findByCursor(options: FindByCursorOptions<typeof AttributeValue,AttributeValueRuleGroup,AttributeValueOrderByField>): Observable<AttributeValue[]>;
|
|
332
|
+
/**
|
|
333
|
+
* 查询单个实体,未找到时返回 undefined
|
|
334
|
+
* @param options 查询选项
|
|
335
|
+
* @example
|
|
336
|
+
* AttributeValue.findOne({ where: { combinator: 'and', rules: [] } }).subscribe(entity => console.log(entity));
|
|
337
|
+
*/
|
|
338
|
+
static findOne(options: FindOneOptions<typeof AttributeValue,AttributeValueRuleGroup,AttributeValueOrderByField>): Observable<AttributeValue | undefined>;
|
|
339
|
+
/**
|
|
340
|
+
* 查询单个实体,未找到时抛出错误
|
|
341
|
+
* @param options 查询选项
|
|
342
|
+
* @example
|
|
343
|
+
* AttributeValue.findOneOrFail({ where: { combinator: 'and', rules: [] } }).subscribe(entity => console.log(entity));
|
|
344
|
+
*/
|
|
345
|
+
static findOneOrFail(options: FindOneOrFailOptions<typeof AttributeValue,AttributeValueRuleGroup,AttributeValueOrderByField>): Observable<AttributeValue>;
|
|
346
|
+
/**
|
|
347
|
+
* 根据 ID 获取单个实体
|
|
348
|
+
* @param options 查询选项
|
|
349
|
+
* @example
|
|
350
|
+
* AttributeValue.get('123').subscribe(entity => console.log(entity));
|
|
351
|
+
*/
|
|
352
|
+
static get(options: UUID): Observable<AttributeValue>;
|
|
353
|
+
/**
|
|
354
|
+
* 删除
|
|
355
|
+
*/
|
|
356
|
+
remove(): Promise<AttributeValue>;
|
|
357
|
+
/**
|
|
358
|
+
* 重置数据
|
|
359
|
+
*/
|
|
360
|
+
reset(): void;
|
|
361
|
+
/**
|
|
362
|
+
* 保存
|
|
363
|
+
*/
|
|
364
|
+
save(): Promise<AttributeValue>;
|
|
365
|
+
}
|
|
366
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Entity, EntityBase, PropertyType, RelationKind, __decorateClass } from '@aiao/rxdb';
|
|
2
|
+
let AttributeValue = class extends EntityBase {};
|
|
3
|
+
AttributeValue = __decorateClass(
|
|
4
|
+
[
|
|
5
|
+
Entity({
|
|
6
|
+
name: "AttributeValue",
|
|
7
|
+
tableName: "attribute_value",
|
|
8
|
+
displayName: "属性值",
|
|
9
|
+
properties: [
|
|
10
|
+
{
|
|
11
|
+
name: "name",
|
|
12
|
+
type: PropertyType.string,
|
|
13
|
+
displayName: "属性值名称",
|
|
14
|
+
columnName: "name"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
relations: [
|
|
18
|
+
{
|
|
19
|
+
name: "attribute",
|
|
20
|
+
displayName: "所属属性",
|
|
21
|
+
kind: RelationKind.MANY_TO_ONE,
|
|
22
|
+
mappedEntity: "Attribute",
|
|
23
|
+
mappedProperty: "values",
|
|
24
|
+
mappedNamespace: "public",
|
|
25
|
+
onDelete: "RESTRICT",
|
|
26
|
+
onUpdate: "RESTRICT",
|
|
27
|
+
columnName: "attributeId"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "skuAttributeValues",
|
|
31
|
+
displayName: "SKU属性值关联",
|
|
32
|
+
kind: RelationKind.ONE_TO_MANY,
|
|
33
|
+
mappedEntity: "SKUAttributes",
|
|
34
|
+
mappedProperty: "value",
|
|
35
|
+
mappedNamespace: "public",
|
|
36
|
+
onDelete: "CASCADE",
|
|
37
|
+
onUpdate: "RESTRICT"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
repository: "Repository",
|
|
41
|
+
namespace: "public",
|
|
42
|
+
indexes: [],
|
|
43
|
+
computedProperties: [],
|
|
44
|
+
extends: [
|
|
45
|
+
"EntityBase"
|
|
46
|
+
]
|
|
47
|
+
})
|
|
48
|
+
],
|
|
49
|
+
AttributeValue
|
|
50
|
+
);
|
|
51
|
+
export { AttributeValue };
|