import 'package:drift/drift.dart';

@DataClassName('DriftGroup')
class Groups extends Table {
  IntColumn get id => integer()();
  IntColumn get userJoinDate => integer().nullable()();
  TextColumn get name => text().nullable()();
  TextColumn get profile => text().nullable()();
  TextColumn get icon => text().nullable()();
  TextColumn get iconGaussian => text().withDefault(const Constant(''))();
  IntColumn get permission => integer().nullable()();
  IntColumn get admin => integer().nullable()();
  TextColumn get members => text().nullable()();
  IntColumn get owner => integer().nullable()();
  TextColumn get admins => text().nullable()();
  IntColumn get visible => integer().nullable()();
  IntColumn get speakInterval => integer().nullable()();
  IntColumn get groupType => integer().nullable()();
  IntColumn get roomType => integer().nullable()();
  IntColumn get maxNumber => integer().nullable()();
  IntColumn get channelId => integer().nullable()();
  IntColumn get channelGroupId => integer().nullable()();
  IntColumn get createTime => integer().nullable()();
  IntColumn get updateTime => integer().nullable()();
  IntColumn get addIndex => integer().nullable()();
  IntColumn get maxMember => integer().nullable()();
  IntColumn get expireTime => integer().nullable()();
  IntColumn get workspaceId => integer().withDefault(const Constant(0))();
  IntColumn get mode => integer().withDefault(const Constant(0))();
  IntColumn get redpacketPlay => integer().withDefault(const Constant(0))();
  TextColumn get topic => text().nullable()();
  TextColumn get rp => text().nullable()();

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

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