added ratings

This commit is contained in:
2022-09-04 13:27:35 +06:00
parent 18b2e7b3c4
commit 1e393103c8
21 changed files with 437 additions and 32 deletions

View File

@@ -12,6 +12,9 @@ dependencies {
api project(":plaguposter.posts_registrar")
api project(":plaguposter.triggers.command")
api project(":plaguposter.ratings")
api project(":plaguposter.ratings.source")
api libs.psql
}
application {

View File

@@ -1,21 +1,28 @@
{
"database": {
"url": "jdbc:sqlite:file:test?mode=memory&cache=shared IT IS JUST EXAMPLE",
"driver": "org.sqlite.JDBC",
"username": "OPTIONAL username",
"password": "OPTIONAL password",
"initAutomatically": false
"url": "jdbc:postgresql://127.0.0.1:8091/test",
"username": "test",
"password": "test",
"driver": "org.postgresql.Driver"
},
"botToken": "1234567890:ABCDEFGHIJKLMNOP_qrstuvwxyz12345678",
"plugins": [
"dev.inmo.plaguposter.posts.Plugin",
"dev.inmo.plaguposter.posts.registrar.Plugin"
"dev.inmo.plaguposter.posts.registrar.Plugin",
"dev.inmo.plaguposter.ratings.Plugin",
"dev.inmo.plaguposter.ratings.source.Plugin"
],
"posts": {
"targetChat": 12345678,
"cacheChat": 12345678
},
"registrar": {
"cacheChat": 12345678,
"sourceChat": 12345678
},
"ratingsPolls": {
"variants": {
"Ok": 1,
"Not ok": -1
},
"autoAttach": true,
"ratingOfferText": "What do you think about it?"
}
}

12
runner/docker-compose.yml Normal file
View File

@@ -0,0 +1,12 @@
version: "3.4"
services:
plaguposter_postgres:
image: postgres
container_name: "plaguposter_postgres"
environment:
POSTGRES_USER: "test"
POSTGRES_PASSWORD: "test"
POSTGRES_DB: "test"
ports:
- "8091:5432"