# Conflicts: # apps/im_app/lib/features/chat/presentation/chat_db_test_view_model.dart # apps/im_app/lib/features/login/presentation/login_view_model.dart 修复逻辑漏洞,性能优化
27 lines
1.1 KiB
Dart
27 lines
1.1 KiB
Dart
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';
|
|
}
|