add: datatypes

main
ycz008 2023-07-21 18:05:03 +08:00
parent 135c09394d
commit 156515700c
8 changed files with 433 additions and 0 deletions

26
datatypes/es/client.json Normal file
View File

@ -0,0 +1,26 @@
{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 1,
"analysis": {
"normalizer": {
"lowercase": {
"type": "custom",
"filter": [
"lowercase"
]
}
}
}
},
"mappings": {
"properties": {
"clientId": {
"type": "text"
},
"name": {
"type": "text"
}
}
}
}

View File

@ -0,0 +1,38 @@
{
"settings": {
"index": {
"number_of_shards": 3,
"number_of_replicas": 1,
"sort.field": "sequenceNumber",
"sort.order": "asc"
}
},
"mappings": {
"properties": {
"questionId": {
"type": "text"
},
"sequenceNumber": {
"type": "long"
},
"name": {
"type": "text"
},
"tags": {
"type": "keyword"
},
"clients": {
"type": "keyword"
},
"topic": {
"type": "keyword"
},
"difficulty": {
"type": "keyword"
},
"frequency": {
"type": "keyword"
}
}
}
}

View File

@ -0,0 +1,83 @@
{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 1,
"analysis": {
"normalizer": {
"lowercase": {
"type": "custom",
"filter": [
"lowercase"
]
}
}
}
},
"mappings": {
"properties": {
"subscriptionId": {
"type": "keyword"
},
"userId": {
"type": "keyword"
},
"userFirstName": {
"type": "keyword"
},
"userLastName": {
"type": "keyword"
},
"userPreferredName": {
"type": "keyword"
},
"userFullName": {
"type": "keyword",
"normalizer": "lowercase"
},
"userEmail": {
"type": "keyword",
"normalizer": "lowercase"
},
"userAvatar": {
"type": "keyword"
},
"clientIds": {
"type": "keyword"
},
"createDate": {
"type": "date",
"format": "uuuu-MM-dd'T'HH:mm:ss.SSS'Z['z']'"
},
"totalLengthInDays": {
"type": "integer"
},
"startDate": {
"type": "date",
"format": "uuuu-MM-dd'T'HH:mm:ss.SSS'Z['z']'"
},
"endDate": {
"type": "date",
"format": "uuuu-MM-dd'T'HH:mm:ss.SSS'Z['z']'"
},
"lastModifyDate": {
"type": "date",
"format": "uuuu-MM-dd'T'HH:mm:ss.SSS'Z['z']'"
},
"batchCategoryName": {
"type": "keyword"
},
"batchName": {
"type": "keyword"
},
"subscribeAllClients": {
"type": "boolean"
},
"confirmationNumber": {
"type": "keyword"
},
"creatorFullName": {
"type": "keyword"
}
}
}
}

View File

@ -0,0 +1,18 @@
{
"settings": {
"index": {
"number_of_shards": 3,
"number_of_replicas": 1
}
},
"mappings": {
"properties": {
"tag": {
"type": "text"
},
"count": {
"type": "integer"
}
}
}
}

View File

@ -0,0 +1,17 @@
{
"settings": {
"index": {
"number_of_shards": 3,
"number_of_replicas": 1,
"sort.field": "topic",
"sort.order": "asc"
}
},
"mappings": {
"properties": {
"topic": {
"type": "keyword"
}
}
}
}

View File

@ -0,0 +1,54 @@
{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 1,
"analysis": {
"normalizer": {
"lowercase": {
"type": "custom",
"filter": [
"lowercase"
]
}
}
}
},
"mappings": {
"properties": {
"active": {
"type": "boolean"
},
"answer": {
"type": "text"
},
"codeBlock": {
"type": "text"
},
"createdAt": {
"type": "date",
"format": "yyyy-MM-dd'T'HH:mm:ss"
},
"description": {
"type": "text"
},
"isActive": {
"type": "boolean"
},
"name": {
"type": "text"
},
"questionId": {
"type": "text"
},
"tags": {
"type": "keyword"
},
"topic": {
"type": "keyword"
},
"weight": {
"type": "float"
}
}
}
}

68
datatypes/es/user2.json Normal file
View File

@ -0,0 +1,68 @@
{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 2
},
"mappings": {
"properties": {
"accountIds": {
"type": "keyword"
},
"batchAddedDate": {
"type": "date",
"format": "uuuu-MM-dd'T'HH:mm:ss"
},
"clients": {
"type": "keyword"
},
"company": {
"type": "keyword"
},
"companyId": {
"type": "keyword"
},
"createdDate": {
"type": "date",
"format": "uuuu-MM-dd'T'HH:mm:ss"
},
"email": {
"type": "keyword"
},
"firstName": {
"type": "keyword"
},
"fullName": {
"type": "text"
},
"isActive": {
"type": "boolean"
},
"lastName": {
"type": "keyword"
},
"middleName": {
"type": "keyword"
},
"preferredName": {
"type": "keyword"
},
"status": {
"type": "keyword"
},
"tags": {
"type": "nested",
"properties": {
"name": {
"type": "keyword"
},
"value": {
"type": "keyword"
}
}
},
"userId": {
"type": "text"
}
}
}
}

129
datatypes/mysql/EventStore Normal file
View File

@ -0,0 +1,129 @@
use EventStore;
CREATE TABLE `authDomainEventEntry` (
`globalIndex` bigint(20) NOT NULL AUTO_INCREMENT,
`aggregateIdentifier` varchar(255) NOT NULL,
`sequenceNumber` bigint(20) NOT NULL,
`type` varchar(255) DEFAULT NULL,
`eventIdentifier` varchar(255) NOT NULL,
`metaData` blob,
`payload` blob NOT NULL,
`payloadRevision` varchar(255) DEFAULT NULL,
`payloadType` varchar(255) NOT NULL,
`timeStamp` varchar(255) NOT NULL,
PRIMARY KEY (`globalIndex`),
UNIQUE KEY `aggregateIdentifier` (`aggregateIdentifier`,`sequenceNumber`),
UNIQUE KEY `eventIdentifier` (`eventIdentifier`)
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=latin1;
CREATE TABLE `batchDomainEventEntry` (
`globalIndex` bigint(20) NOT NULL AUTO_INCREMENT,
`aggregateIdentifier` varchar(255) NOT NULL,
`sequenceNumber` bigint(20) NOT NULL,
`type` varchar(255) DEFAULT NULL,
`eventIdentifier` varchar(255) NOT NULL,
`metaData` blob,
`payload` blob NOT NULL,
`payloadRevision` varchar(255) DEFAULT NULL,
`payloadType` varchar(255) NOT NULL,
`timeStamp` varchar(255) NOT NULL,
PRIMARY KEY (`globalIndex`),
UNIQUE KEY `aggregateIdentifier` (`aggregateIdentifier`,`sequenceNumber`),
UNIQUE KEY `eventIdentifier` (`eventIdentifier`)
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=latin1;
CREATE TABLE `companyDomainEventEntry` (
`globalIndex` bigint(20) NOT NULL AUTO_INCREMENT,
`aggregateIdentifier` varchar(255) NOT NULL,
`sequenceNumber` bigint(20) NOT NULL,
`type` varchar(255) DEFAULT NULL,
`eventIdentifier` varchar(255) NOT NULL,
`metaData` blob,
`payload` blob NOT NULL,
`payloadRevision` varchar(255) DEFAULT NULL,
`payloadType` varchar(255) NOT NULL,
`timeStamp` varchar(255) NOT NULL,
PRIMARY KEY (`globalIndex`),
UNIQUE KEY `aggregateIdentifier` (`aggregateIdentifier`,`sequenceNumber`),
UNIQUE KEY `eventIdentifier` (`eventIdentifier`)
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=latin1;
CREATE TABLE `emailDomainEventEntry` (
`globalIndex` bigint(20) NOT NULL AUTO_INCREMENT,
`aggregateIdentifier` varchar(255) NOT NULL,
`sequenceNumber` bigint(20) NOT NULL,
`type` varchar(255) DEFAULT NULL,
`eventIdentifier` varchar(255) NOT NULL,
`metaData` blob,
`payload` blob NOT NULL,
`payloadRevision` varchar(255) DEFAULT NULL,
`payloadType` varchar(255) NOT NULL,
`timeStamp` varchar(255) NOT NULL,
PRIMARY KEY (`globalIndex`),
UNIQUE KEY `aggregateIdentifier` (`aggregateIdentifier`,`sequenceNumber`),
UNIQUE KEY `eventIdentifier` (`eventIdentifier`)
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=latin1;
CREATE TABLE `kpiDomainEventEntry` (
`globalIndex` bigint(20) NOT NULL AUTO_INCREMENT,
`aggregateIdentifier` varchar(255) NOT NULL,
`sequenceNumber` bigint(20) NOT NULL,
`type` varchar(255) DEFAULT NULL,
`eventIdentifier` varchar(255) NOT NULL,
`metaData` blob,
`payload` blob NOT NULL,
`payloadRevision` varchar(255) DEFAULT NULL,
`payloadType` varchar(255) NOT NULL,
`timeStamp` varchar(255) NOT NULL,
PRIMARY KEY (`globalIndex`),
UNIQUE KEY `aggregateIdentifier` (`aggregateIdentifier`,`sequenceNumber`),
UNIQUE KEY `eventIdentifier` (`eventIdentifier`)
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=latin1;
CREATE TABLE `questionDomainEventEntry` (
`globalIndex` bigint(20) NOT NULL AUTO_INCREMENT,
`aggregateIdentifier` varchar(255) NOT NULL,
`sequenceNumber` bigint(20) NOT NULL,
`type` varchar(255) DEFAULT NULL,
`eventIdentifier` varchar(255) NOT NULL,
`metaData` blob,
`payload` blob NOT NULL,
`payloadRevision` varchar(255) DEFAULT NULL,
`payloadType` varchar(255) NOT NULL,
`timeStamp` varchar(255) NOT NULL,
PRIMARY KEY (`globalIndex`),
UNIQUE KEY `aggregateIdentifier` (`aggregateIdentifier`,`sequenceNumber`),
UNIQUE KEY `eventIdentifier` (`eventIdentifier`)
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=latin1;
CREATE TABLE `subscriptionDomainEventEntry` (
`globalIndex` bigint(20) NOT NULL AUTO_INCREMENT,
`aggregateIdentifier` varchar(255) NOT NULL,
`sequenceNumber` bigint(20) NOT NULL,
`type` varchar(255) DEFAULT NULL,
`eventIdentifier` varchar(255) NOT NULL,
`metaData` blob,
`payload` blob NOT NULL,
`payloadRevision` varchar(255) DEFAULT NULL,
`payloadType` varchar(255) NOT NULL,
`timeStamp` varchar(255) NOT NULL,
PRIMARY KEY (`globalIndex`),
UNIQUE KEY `aggregateIdentifier` (`aggregateIdentifier`,`sequenceNumber`),
UNIQUE KEY `eventIdentifier` (`eventIdentifier`)
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=latin1;
CREATE TABLE `userDomainEventEntry` (
`globalIndex` bigint(20) NOT NULL AUTO_INCREMENT,
`aggregateIdentifier` varchar(255) NOT NULL,
`sequenceNumber` bigint(20) NOT NULL,
`type` varchar(255) DEFAULT NULL,
`eventIdentifier` varchar(255) NOT NULL,
`metaData` blob,
`payload` blob NOT NULL,
`payloadRevision` varchar(255) DEFAULT NULL,
`payloadType` varchar(255) NOT NULL,
`timeStamp` varchar(255) NOT NULL,
PRIMARY KEY (`globalIndex`),
UNIQUE KEY `aggregateIdentifier` (`aggregateIdentifier`,`sequenceNumber`),
UNIQUE KEY `eventIdentifier` (`eventIdentifier`)
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=latin1;