Add timeseries, discriminator
This commit is contained in:
28
.test/event.json
Normal file
28
.test/event.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"_group": "system_collections",
|
||||
"_name": "event",
|
||||
"_version": "202507",
|
||||
"singular": "event",
|
||||
"plural": "events",
|
||||
"idPrefix": "e",
|
||||
"indexSpecs": [],
|
||||
"timeseries": {
|
||||
"timeField": "createdAt",
|
||||
"metaField": "name",
|
||||
"granularity": "minutes"
|
||||
},
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"_id": {
|
||||
"bsonType": "string"
|
||||
},
|
||||
"name": {
|
||||
"bsonType": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"bsonType": "timestamp"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
35
.test/offer.json
Normal file
35
.test/offer.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"_group": "system_collections",
|
||||
"_name": "offer",
|
||||
"_version": "202507",
|
||||
"singular": "offer",
|
||||
"plural": "offers",
|
||||
"idPrefix": "ofr",
|
||||
"indexSpecs": [{
|
||||
"name": "name_1",
|
||||
"keys": { "name": 1 },
|
||||
"unique": true
|
||||
}],
|
||||
"discriminator": {
|
||||
"field": "store",
|
||||
"ctxField": "store",
|
||||
"collection": "store"
|
||||
},
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"_id": {
|
||||
"bsonType": "string"
|
||||
},
|
||||
"name": {
|
||||
"bsonType": "string"
|
||||
},
|
||||
"store": {
|
||||
"bsonType": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"bsonType": "date"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
36
.test/store.json
Normal file
36
.test/store.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"_group": "system_collections",
|
||||
"_name": "store",
|
||||
"_version": "202507",
|
||||
"singular": "store",
|
||||
"plural": "stores",
|
||||
"idPrefix": "str",
|
||||
"indexSpecs": [{
|
||||
"name": "code_1",
|
||||
"keys": { "code": 1 },
|
||||
"unique": true
|
||||
}],
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"_id": {
|
||||
"bsonType": "string"
|
||||
},
|
||||
"code": {
|
||||
"bsonType": "string"
|
||||
},
|
||||
"name": {
|
||||
"bsonType": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"bsonType": "date"
|
||||
},
|
||||
"updated_at": {
|
||||
"bsonType": "date"
|
||||
},
|
||||
"archived_at": {
|
||||
"bsonType": "date"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user