mnemo_cards/mnemo_cards_backend/lib/database/tables/telegram.dart
Dmitry fb7780c215
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
time
2025-12-14 00:40:59 +03:00

22 lines
797 B
Dart

import 'package:drift/drift.dart';
import '../converters.dart' show generateUuid;
import '../postgres_constants.dart';
/// Таблица ShareRequests - запросы на шаринг через Telegram
class ShareRequests extends Table {
TextColumn get id => text().withDefault(const Constant('gen_random_uuid()'))();
TextColumn get telegramUserId => text()();
TextColumn get telegramUsername => text().nullable()();
TextColumn get sharedCardId => text().nullable()();
DateTimeColumn get requestedAt => dateTime().withDefault(currentTimestamp)();
// Audit
DateTimeColumn get createdAt => dateTime().withDefault(currentTimestamp)();
DateTimeColumn get updatedAt => dateTime().withDefault(currentTimestamp)();
@override
Set<Column> get primaryKey => {id};
}