import 'package:drift/drift.dart';

@DataClassName('DriftFavourite')
class Favourites extends Table {
  IntColumn get id => integer()();
  TextColumn get parentId => text().withDefault(const Constant(''))();
  TextColumn get data => text().withDefault(const Constant(''))();
  IntColumn get createdAt => integer().withDefault(const Constant(0))();
  IntColumn get updatedAt => integer().withDefault(const Constant(0))();
  IntColumn get deletedAt => integer().withDefault(const Constant(0))();
  IntColumn get source => integer().nullable()();
  IntColumn get userId => integer().nullable()();
  IntColumn get authorId => integer().nullable()();
  TextColumn get typ => text().withDefault(const Constant('[]'))();
  TextColumn get tag => text().withDefault(const Constant('[]'))();
  IntColumn get isPin => integer().withDefault(const Constant(0))();
  IntColumn get chatTyp => integer().withDefault(const Constant(0))();
  IntColumn get isUploaded => integer().withDefault(const Constant(1))();
  TextColumn get urls => text().withDefault(const Constant('[]'))();

  @override
  Set<Column> get primaryKey => {id};

  @override
  String get tableName => 'favourite';
}