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
22 lines
797 B
Dart
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};
|
|
}
|