数据库表迁移
This commit is contained in:
26
apps/im_app/lib/data/local/drift/tables/favourites.dart
Normal file
26
apps/im_app/lib/data/local/drift/tables/favourites.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
@DataClassName('Favourite')
|
||||
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';
|
||||
}
|
||||
Reference in New Issue
Block a user