import 'package:drift/drift.dart';

@DataClassName('DriftUser')
class Users extends Table {
  IntColumn get id => integer().autoIncrement()();
  IntColumn get uid => integer().unique()();
  TextColumn get uuid => text().nullable()();
  IntColumn get lastOnline => integer().nullable()();
  TextColumn get profilePic => text().nullable()();
  TextColumn get profilePicGaussian => text().withDefault(const Constant(''))();
  TextColumn get nickname => text().nullable()();
  TextColumn get depositName => text().nullable()();
  IntColumn get hasSetDepositName => integer().withDefault(const Constant(0))();
  TextColumn get contact => text().nullable()();
  TextColumn get countryCode => text().nullable()();
  TextColumn get username => text().nullable()();
  IntColumn get role => integer().nullable()();
  IntColumn get relationship => integer().nullable()();
  IntColumn get friendStatus => integer().nullable()();
  TextColumn get bio => text().nullable()();
  TextColumn get userAlias => text().nullable()();
  IntColumn get requestAt => integer().nullable()();
  IntColumn get deletedAt => integer().nullable()();
  TextColumn get email => text().nullable()();
  TextColumn get recoveryEmail => text().nullable()();
  TextColumn get remark => text().nullable()();
  TextColumn get source => text().nullable()();
  IntColumn get addIndex => integer().nullable()();
  IntColumn get incomingSoundId => integer().withDefault(const Constant(0))();
  IntColumn get outgoingSoundId => integer().withDefault(const Constant(0))();
  IntColumn get notificationSoundId =>
      integer().withDefault(const Constant(0))();
  IntColumn get sendMessageSoundId =>
      integer().withDefault(const Constant(0))();
  IntColumn get groupNotificationSoundId =>
      integer().withDefault(const Constant(0))();
  TextColumn get groupTags => text().withDefault(const Constant('[]'))();
  TextColumn get friendTags => text().withDefault(const Constant('[]'))();
  TextColumn get publicKey => text().nullable()();
  IntColumn get configBits => integer().withDefault(const Constant(0))();
  TextColumn get hint => text().nullable()();

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