// dart format width=80 // GENERATED CODE, DO NOT EDIT BY HAND. // ignore_for_file: type=lint import 'package:drift/drift.dart'; class Sessions extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; Sessions(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); late final GeneratedColumn title = GeneratedColumn( 'title', aliasedName, false, additionalChecks: GeneratedColumn.checkTextLength(minTextLength: 3, maxTextLength: 32), type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn content = GeneratedColumn( 'body', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn status = GeneratedColumn( 'status', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn achievements = GeneratedColumn( 'achievements', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn address = GeneratedColumn( 'address', aliasedName, true, additionalChecks: GeneratedColumn.checkTextLength(minTextLength: 3, maxTextLength: 256), type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn date = GeneratedColumn( 'date', aliasedName, true, type: DriftSqlType.dateTime, requiredDuringInsert: false); late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: Variable(DateTime.now())); @override List get $columns => [id, title, content, status, achievements, address, date, createdAt]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'sessions'; @override Set get $primaryKey => {id}; @override SessionsData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return SessionsData( id: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}id'])!, title: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}title'])!, content: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}body'])!, status: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}status'])!, achievements: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}achievements']), address: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}address']), date: attachedDatabase.typeMapping .read(DriftSqlType.dateTime, data['${effectivePrefix}date']), createdAt: attachedDatabase.typeMapping .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, ); } @override Sessions createAlias(String alias) { return Sessions(attachedDatabase, alias); } } class SessionsData extends DataClass implements Insertable { final int id; final String title; final String content; final String status; final String? achievements; final String? address; final DateTime? date; final DateTime createdAt; const SessionsData( {required this.id, required this.title, required this.content, required this.status, this.achievements, this.address, this.date, required this.createdAt}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['title'] = Variable(title); map['body'] = Variable(content); map['status'] = Variable(status); if (!nullToAbsent || achievements != null) { map['achievements'] = Variable(achievements); } if (!nullToAbsent || address != null) { map['address'] = Variable(address); } if (!nullToAbsent || date != null) { map['date'] = Variable(date); } map['created_at'] = Variable(createdAt); return map; } SessionsCompanion toCompanion(bool nullToAbsent) { return SessionsCompanion( id: Value(id), title: Value(title), content: Value(content), status: Value(status), achievements: achievements == null && nullToAbsent ? const Value.absent() : Value(achievements), address: address == null && nullToAbsent ? const Value.absent() : Value(address), date: date == null && nullToAbsent ? const Value.absent() : Value(date), createdAt: Value(createdAt), ); } factory SessionsData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return SessionsData( id: serializer.fromJson(json['id']), title: serializer.fromJson(json['title']), content: serializer.fromJson(json['content']), status: serializer.fromJson(json['status']), achievements: serializer.fromJson(json['achievements']), address: serializer.fromJson(json['address']), date: serializer.fromJson(json['date']), createdAt: serializer.fromJson(json['createdAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'title': serializer.toJson(title), 'content': serializer.toJson(content), 'status': serializer.toJson(status), 'achievements': serializer.toJson(achievements), 'address': serializer.toJson(address), 'date': serializer.toJson(date), 'createdAt': serializer.toJson(createdAt), }; } SessionsData copyWith( {int? id, String? title, String? content, String? status, Value achievements = const Value.absent(), Value address = const Value.absent(), Value date = const Value.absent(), DateTime? createdAt}) => SessionsData( id: id ?? this.id, title: title ?? this.title, content: content ?? this.content, status: status ?? this.status, achievements: achievements.present ? achievements.value : this.achievements, address: address.present ? address.value : this.address, date: date.present ? date.value : this.date, createdAt: createdAt ?? this.createdAt, ); SessionsData copyWithCompanion(SessionsCompanion data) { return SessionsData( id: data.id.present ? data.id.value : this.id, title: data.title.present ? data.title.value : this.title, content: data.content.present ? data.content.value : this.content, status: data.status.present ? data.status.value : this.status, achievements: data.achievements.present ? data.achievements.value : this.achievements, address: data.address.present ? data.address.value : this.address, date: data.date.present ? data.date.value : this.date, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, ); } @override String toString() { return (StringBuffer('SessionsData(') ..write('id: $id, ') ..write('title: $title, ') ..write('content: $content, ') ..write('status: $status, ') ..write('achievements: $achievements, ') ..write('address: $address, ') ..write('date: $date, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, title, content, status, achievements, address, date, createdAt); @override bool operator ==(Object other) => identical(this, other) || (other is SessionsData && other.id == this.id && other.title == this.title && other.content == this.content && other.status == this.status && other.achievements == this.achievements && other.address == this.address && other.date == this.date && other.createdAt == this.createdAt); } class SessionsCompanion extends UpdateCompanion { final Value id; final Value title; final Value content; final Value status; final Value achievements; final Value address; final Value date; final Value createdAt; const SessionsCompanion({ this.id = const Value.absent(), this.title = const Value.absent(), this.content = const Value.absent(), this.status = const Value.absent(), this.achievements = const Value.absent(), this.address = const Value.absent(), this.date = const Value.absent(), this.createdAt = const Value.absent(), }); SessionsCompanion.insert({ this.id = const Value.absent(), required String title, required String content, required String status, this.achievements = const Value.absent(), this.address = const Value.absent(), this.date = const Value.absent(), this.createdAt = const Value.absent(), }) : title = Value(title), content = Value(content), status = Value(status); static Insertable custom({ Expression? id, Expression? title, Expression? content, Expression? status, Expression? achievements, Expression? address, Expression? date, Expression? createdAt, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (title != null) 'title': title, if (content != null) 'body': content, if (status != null) 'status': status, if (achievements != null) 'achievements': achievements, if (address != null) 'address': address, if (date != null) 'date': date, if (createdAt != null) 'created_at': createdAt, }); } SessionsCompanion copyWith( {Value? id, Value? title, Value? content, Value? status, Value? achievements, Value? address, Value? date, Value? createdAt}) { return SessionsCompanion( id: id ?? this.id, title: title ?? this.title, content: content ?? this.content, status: status ?? this.status, achievements: achievements ?? this.achievements, address: address ?? this.address, date: date ?? this.date, createdAt: createdAt ?? this.createdAt, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (title.present) { map['title'] = Variable(title.value); } if (content.present) { map['body'] = Variable(content.value); } if (status.present) { map['status'] = Variable(status.value); } if (achievements.present) { map['achievements'] = Variable(achievements.value); } if (address.present) { map['address'] = Variable(address.value); } if (date.present) { map['date'] = Variable(date.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } return map; } @override String toString() { return (StringBuffer('SessionsCompanion(') ..write('id: $id, ') ..write('title: $title, ') ..write('content: $content, ') ..write('status: $status, ') ..write('achievements: $achievements, ') ..write('address: $address, ') ..write('date: $date, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } } class Activities extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; Activities(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); late final GeneratedColumn title = GeneratedColumn( 'title', aliasedName, false, additionalChecks: GeneratedColumn.checkTextLength(minTextLength: 3, maxTextLength: 32), type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn type = GeneratedColumn( 'type', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn description = GeneratedColumn( 'body', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn category = GeneratedColumn( 'category', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: Variable(DateTime.now())); @override List get $columns => [id, title, type, description, category, createdAt]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'activities'; @override Set get $primaryKey => {id}; @override ActivitiesData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return ActivitiesData( id: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}id'])!, title: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}title'])!, type: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}type'])!, description: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}body'])!, category: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}category'])!, createdAt: attachedDatabase.typeMapping .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, ); } @override Activities createAlias(String alias) { return Activities(attachedDatabase, alias); } } class ActivitiesData extends DataClass implements Insertable { final int id; final String title; final String type; final String description; final String category; final DateTime createdAt; const ActivitiesData( {required this.id, required this.title, required this.type, required this.description, required this.category, required this.createdAt}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['title'] = Variable(title); map['type'] = Variable(type); map['body'] = Variable(description); map['category'] = Variable(category); map['created_at'] = Variable(createdAt); return map; } ActivitiesCompanion toCompanion(bool nullToAbsent) { return ActivitiesCompanion( id: Value(id), title: Value(title), type: Value(type), description: Value(description), category: Value(category), createdAt: Value(createdAt), ); } factory ActivitiesData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return ActivitiesData( id: serializer.fromJson(json['id']), title: serializer.fromJson(json['title']), type: serializer.fromJson(json['type']), description: serializer.fromJson(json['description']), category: serializer.fromJson(json['category']), createdAt: serializer.fromJson(json['createdAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'title': serializer.toJson(title), 'type': serializer.toJson(type), 'description': serializer.toJson(description), 'category': serializer.toJson(category), 'createdAt': serializer.toJson(createdAt), }; } ActivitiesData copyWith( {int? id, String? title, String? type, String? description, String? category, DateTime? createdAt}) => ActivitiesData( id: id ?? this.id, title: title ?? this.title, type: type ?? this.type, description: description ?? this.description, category: category ?? this.category, createdAt: createdAt ?? this.createdAt, ); ActivitiesData copyWithCompanion(ActivitiesCompanion data) { return ActivitiesData( id: data.id.present ? data.id.value : this.id, title: data.title.present ? data.title.value : this.title, type: data.type.present ? data.type.value : this.type, description: data.description.present ? data.description.value : this.description, category: data.category.present ? data.category.value : this.category, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, ); } @override String toString() { return (StringBuffer('ActivitiesData(') ..write('id: $id, ') ..write('title: $title, ') ..write('type: $type, ') ..write('description: $description, ') ..write('category: $category, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, title, type, description, category, createdAt); @override bool operator ==(Object other) => identical(this, other) || (other is ActivitiesData && other.id == this.id && other.title == this.title && other.type == this.type && other.description == this.description && other.category == this.category && other.createdAt == this.createdAt); } class ActivitiesCompanion extends UpdateCompanion { final Value id; final Value title; final Value type; final Value description; final Value category; final Value createdAt; const ActivitiesCompanion({ this.id = const Value.absent(), this.title = const Value.absent(), this.type = const Value.absent(), this.description = const Value.absent(), this.category = const Value.absent(), this.createdAt = const Value.absent(), }); ActivitiesCompanion.insert({ this.id = const Value.absent(), required String title, required String type, required String description, required String category, this.createdAt = const Value.absent(), }) : title = Value(title), type = Value(type), description = Value(description), category = Value(category); static Insertable custom({ Expression? id, Expression? title, Expression? type, Expression? description, Expression? category, Expression? createdAt, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (title != null) 'title': title, if (type != null) 'type': type, if (description != null) 'body': description, if (category != null) 'category': category, if (createdAt != null) 'created_at': createdAt, }); } ActivitiesCompanion copyWith( {Value? id, Value? title, Value? type, Value? description, Value? category, Value? createdAt}) { return ActivitiesCompanion( id: id ?? this.id, title: title ?? this.title, type: type ?? this.type, description: description ?? this.description, category: category ?? this.category, createdAt: createdAt ?? this.createdAt, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (title.present) { map['title'] = Variable(title.value); } if (type.present) { map['type'] = Variable(type.value); } if (description.present) { map['body'] = Variable(description.value); } if (category.present) { map['category'] = Variable(category.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } return map; } @override String toString() { return (StringBuffer('ActivitiesCompanion(') ..write('id: $id, ') ..write('title: $title, ') ..write('type: $type, ') ..write('description: $description, ') ..write('category: $category, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } } class SessionActivities extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; SessionActivities(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); late final GeneratedColumn sessionId = GeneratedColumn( 'session_id', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways( 'REFERENCES sessions (id) ON DELETE CASCADE')); late final GeneratedColumn activityId = GeneratedColumn( 'activity_id', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways( 'REFERENCES activities (id) ON DELETE CASCADE')); late final GeneratedColumn position = GeneratedColumn( 'position', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true); late final GeneratedColumn results = GeneratedColumn( 'results', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: Variable(DateTime.now())); @override List get $columns => [id, sessionId, activityId, position, results, createdAt]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'session_activities'; @override Set get $primaryKey => {id}; @override SessionActivitiesData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return SessionActivitiesData( id: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}id'])!, sessionId: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}session_id'])!, activityId: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}activity_id'])!, position: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}position'])!, results: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}results']), createdAt: attachedDatabase.typeMapping .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, ); } @override SessionActivities createAlias(String alias) { return SessionActivities(attachedDatabase, alias); } } class SessionActivitiesData extends DataClass implements Insertable { final int id; final int sessionId; final int activityId; final int position; final String? results; final DateTime createdAt; const SessionActivitiesData( {required this.id, required this.sessionId, required this.activityId, required this.position, this.results, required this.createdAt}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['session_id'] = Variable(sessionId); map['activity_id'] = Variable(activityId); map['position'] = Variable(position); if (!nullToAbsent || results != null) { map['results'] = Variable(results); } map['created_at'] = Variable(createdAt); return map; } SessionActivitiesCompanion toCompanion(bool nullToAbsent) { return SessionActivitiesCompanion( id: Value(id), sessionId: Value(sessionId), activityId: Value(activityId), position: Value(position), results: results == null && nullToAbsent ? const Value.absent() : Value(results), createdAt: Value(createdAt), ); } factory SessionActivitiesData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return SessionActivitiesData( id: serializer.fromJson(json['id']), sessionId: serializer.fromJson(json['sessionId']), activityId: serializer.fromJson(json['activityId']), position: serializer.fromJson(json['position']), results: serializer.fromJson(json['results']), createdAt: serializer.fromJson(json['createdAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'sessionId': serializer.toJson(sessionId), 'activityId': serializer.toJson(activityId), 'position': serializer.toJson(position), 'results': serializer.toJson(results), 'createdAt': serializer.toJson(createdAt), }; } SessionActivitiesData copyWith( {int? id, int? sessionId, int? activityId, int? position, Value results = const Value.absent(), DateTime? createdAt}) => SessionActivitiesData( id: id ?? this.id, sessionId: sessionId ?? this.sessionId, activityId: activityId ?? this.activityId, position: position ?? this.position, results: results.present ? results.value : this.results, createdAt: createdAt ?? this.createdAt, ); SessionActivitiesData copyWithCompanion(SessionActivitiesCompanion data) { return SessionActivitiesData( id: data.id.present ? data.id.value : this.id, sessionId: data.sessionId.present ? data.sessionId.value : this.sessionId, activityId: data.activityId.present ? data.activityId.value : this.activityId, position: data.position.present ? data.position.value : this.position, results: data.results.present ? data.results.value : this.results, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, ); } @override String toString() { return (StringBuffer('SessionActivitiesData(') ..write('id: $id, ') ..write('sessionId: $sessionId, ') ..write('activityId: $activityId, ') ..write('position: $position, ') ..write('results: $results, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, sessionId, activityId, position, results, createdAt); @override bool operator ==(Object other) => identical(this, other) || (other is SessionActivitiesData && other.id == this.id && other.sessionId == this.sessionId && other.activityId == this.activityId && other.position == this.position && other.results == this.results && other.createdAt == this.createdAt); } class SessionActivitiesCompanion extends UpdateCompanion { final Value id; final Value sessionId; final Value activityId; final Value position; final Value results; final Value createdAt; const SessionActivitiesCompanion({ this.id = const Value.absent(), this.sessionId = const Value.absent(), this.activityId = const Value.absent(), this.position = const Value.absent(), this.results = const Value.absent(), this.createdAt = const Value.absent(), }); SessionActivitiesCompanion.insert({ this.id = const Value.absent(), required int sessionId, required int activityId, required int position, this.results = const Value.absent(), this.createdAt = const Value.absent(), }) : sessionId = Value(sessionId), activityId = Value(activityId), position = Value(position); static Insertable custom({ Expression? id, Expression? sessionId, Expression? activityId, Expression? position, Expression? results, Expression? createdAt, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (sessionId != null) 'session_id': sessionId, if (activityId != null) 'activity_id': activityId, if (position != null) 'position': position, if (results != null) 'results': results, if (createdAt != null) 'created_at': createdAt, }); } SessionActivitiesCompanion copyWith( {Value? id, Value? sessionId, Value? activityId, Value? position, Value? results, Value? createdAt}) { return SessionActivitiesCompanion( id: id ?? this.id, sessionId: sessionId ?? this.sessionId, activityId: activityId ?? this.activityId, position: position ?? this.position, results: results ?? this.results, createdAt: createdAt ?? this.createdAt, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (sessionId.present) { map['session_id'] = Variable(sessionId.value); } if (activityId.present) { map['activity_id'] = Variable(activityId.value); } if (position.present) { map['position'] = Variable(position.value); } if (results.present) { map['results'] = Variable(results.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } return map; } @override String toString() { return (StringBuffer('SessionActivitiesCompanion(') ..write('id: $id, ') ..write('sessionId: $sessionId, ') ..write('activityId: $activityId, ') ..write('position: $position, ') ..write('results: $results, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } } class Actions extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; Actions(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); late final GeneratedColumn title = GeneratedColumn( 'title', aliasedName, false, additionalChecks: GeneratedColumn.checkTextLength(minTextLength: 3, maxTextLength: 32), type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn description = GeneratedColumn( 'body', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn set = GeneratedColumn( 'set', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: Variable(DateTime.now())); @override List get $columns => [id, title, description, set, createdAt]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'actions'; @override Set get $primaryKey => {id}; @override ActionsData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return ActionsData( id: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}id'])!, title: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}title'])!, description: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}body'])!, set: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}set'])!, createdAt: attachedDatabase.typeMapping .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, ); } @override Actions createAlias(String alias) { return Actions(attachedDatabase, alias); } } class ActionsData extends DataClass implements Insertable { final int id; final String title; final String description; final String set; final DateTime createdAt; const ActionsData( {required this.id, required this.title, required this.description, required this.set, required this.createdAt}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['title'] = Variable(title); map['body'] = Variable(description); map['set'] = Variable(set); map['created_at'] = Variable(createdAt); return map; } ActionsCompanion toCompanion(bool nullToAbsent) { return ActionsCompanion( id: Value(id), title: Value(title), description: Value(description), set: Value(set), createdAt: Value(createdAt), ); } factory ActionsData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return ActionsData( id: serializer.fromJson(json['id']), title: serializer.fromJson(json['title']), description: serializer.fromJson(json['description']), set: serializer.fromJson(json['set']), createdAt: serializer.fromJson(json['createdAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'title': serializer.toJson(title), 'description': serializer.toJson(description), 'set': serializer.toJson(set), 'createdAt': serializer.toJson(createdAt), }; } ActionsData copyWith( {int? id, String? title, String? description, String? set, DateTime? createdAt}) => ActionsData( id: id ?? this.id, title: title ?? this.title, description: description ?? this.description, set: set ?? this.set, createdAt: createdAt ?? this.createdAt, ); ActionsData copyWithCompanion(ActionsCompanion data) { return ActionsData( id: data.id.present ? data.id.value : this.id, title: data.title.present ? data.title.value : this.title, description: data.description.present ? data.description.value : this.description, set: data.set.present ? data.set.value : this.set, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, ); } @override String toString() { return (StringBuffer('ActionsData(') ..write('id: $id, ') ..write('title: $title, ') ..write('description: $description, ') ..write('set: $set, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, title, description, set, createdAt); @override bool operator ==(Object other) => identical(this, other) || (other is ActionsData && other.id == this.id && other.title == this.title && other.description == this.description && other.set == this.set && other.createdAt == this.createdAt); } class ActionsCompanion extends UpdateCompanion { final Value id; final Value title; final Value description; final Value set; final Value createdAt; const ActionsCompanion({ this.id = const Value.absent(), this.title = const Value.absent(), this.description = const Value.absent(), this.set = const Value.absent(), this.createdAt = const Value.absent(), }); ActionsCompanion.insert({ this.id = const Value.absent(), required String title, required String description, required String set, this.createdAt = const Value.absent(), }) : title = Value(title), description = Value(description), set = Value(set); static Insertable custom({ Expression? id, Expression? title, Expression? description, Expression? set, Expression? createdAt, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (title != null) 'title': title, if (description != null) 'body': description, if (set != null) 'set': set, if (createdAt != null) 'created_at': createdAt, }); } ActionsCompanion copyWith( {Value? id, Value? title, Value? description, Value? set, Value? createdAt}) { return ActionsCompanion( id: id ?? this.id, title: title ?? this.title, description: description ?? this.description, set: set ?? this.set, createdAt: createdAt ?? this.createdAt, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (title.present) { map['title'] = Variable(title.value); } if (description.present) { map['body'] = Variable(description.value); } if (set.present) { map['set'] = Variable(set.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } return map; } @override String toString() { return (StringBuffer('ActionsCompanion(') ..write('id: $id, ') ..write('title: $title, ') ..write('description: $description, ') ..write('set: $set, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } } class ActivityActions extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; ActivityActions(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); late final GeneratedColumn activityId = GeneratedColumn( 'activity_id', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways( 'REFERENCES activities (id) ON DELETE CASCADE')); late final GeneratedColumn actionId = GeneratedColumn( 'action_id', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways( 'REFERENCES actions (id) ON DELETE CASCADE')); late final GeneratedColumn position = GeneratedColumn( 'position', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true); late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: Variable(DateTime.now())); @override List get $columns => [id, activityId, actionId, position, createdAt]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'activity_actions'; @override Set get $primaryKey => {id}; @override ActivityActionsData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return ActivityActionsData( id: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}id'])!, activityId: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}activity_id'])!, actionId: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}action_id'])!, position: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}position'])!, createdAt: attachedDatabase.typeMapping .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, ); } @override ActivityActions createAlias(String alias) { return ActivityActions(attachedDatabase, alias); } } class ActivityActionsData extends DataClass implements Insertable { final int id; final int activityId; final int actionId; final int position; final DateTime createdAt; const ActivityActionsData( {required this.id, required this.activityId, required this.actionId, required this.position, required this.createdAt}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['activity_id'] = Variable(activityId); map['action_id'] = Variable(actionId); map['position'] = Variable(position); map['created_at'] = Variable(createdAt); return map; } ActivityActionsCompanion toCompanion(bool nullToAbsent) { return ActivityActionsCompanion( id: Value(id), activityId: Value(activityId), actionId: Value(actionId), position: Value(position), createdAt: Value(createdAt), ); } factory ActivityActionsData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return ActivityActionsData( id: serializer.fromJson(json['id']), activityId: serializer.fromJson(json['activityId']), actionId: serializer.fromJson(json['actionId']), position: serializer.fromJson(json['position']), createdAt: serializer.fromJson(json['createdAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'activityId': serializer.toJson(activityId), 'actionId': serializer.toJson(actionId), 'position': serializer.toJson(position), 'createdAt': serializer.toJson(createdAt), }; } ActivityActionsData copyWith( {int? id, int? activityId, int? actionId, int? position, DateTime? createdAt}) => ActivityActionsData( id: id ?? this.id, activityId: activityId ?? this.activityId, actionId: actionId ?? this.actionId, position: position ?? this.position, createdAt: createdAt ?? this.createdAt, ); ActivityActionsData copyWithCompanion(ActivityActionsCompanion data) { return ActivityActionsData( id: data.id.present ? data.id.value : this.id, activityId: data.activityId.present ? data.activityId.value : this.activityId, actionId: data.actionId.present ? data.actionId.value : this.actionId, position: data.position.present ? data.position.value : this.position, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, ); } @override String toString() { return (StringBuffer('ActivityActionsData(') ..write('id: $id, ') ..write('activityId: $activityId, ') ..write('actionId: $actionId, ') ..write('position: $position, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, activityId, actionId, position, createdAt); @override bool operator ==(Object other) => identical(this, other) || (other is ActivityActionsData && other.id == this.id && other.activityId == this.activityId && other.actionId == this.actionId && other.position == this.position && other.createdAt == this.createdAt); } class ActivityActionsCompanion extends UpdateCompanion { final Value id; final Value activityId; final Value actionId; final Value position; final Value createdAt; const ActivityActionsCompanion({ this.id = const Value.absent(), this.activityId = const Value.absent(), this.actionId = const Value.absent(), this.position = const Value.absent(), this.createdAt = const Value.absent(), }); ActivityActionsCompanion.insert({ this.id = const Value.absent(), required int activityId, required int actionId, required int position, this.createdAt = const Value.absent(), }) : activityId = Value(activityId), actionId = Value(actionId), position = Value(position); static Insertable custom({ Expression? id, Expression? activityId, Expression? actionId, Expression? position, Expression? createdAt, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (activityId != null) 'activity_id': activityId, if (actionId != null) 'action_id': actionId, if (position != null) 'position': position, if (createdAt != null) 'created_at': createdAt, }); } ActivityActionsCompanion copyWith( {Value? id, Value? activityId, Value? actionId, Value? position, Value? createdAt}) { return ActivityActionsCompanion( id: id ?? this.id, activityId: activityId ?? this.activityId, actionId: actionId ?? this.actionId, position: position ?? this.position, createdAt: createdAt ?? this.createdAt, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (activityId.present) { map['activity_id'] = Variable(activityId.value); } if (actionId.present) { map['action_id'] = Variable(actionId.value); } if (position.present) { map['position'] = Variable(position.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } return map; } @override String toString() { return (StringBuffer('ActivityActionsCompanion(') ..write('id: $id, ') ..write('activityId: $activityId, ') ..write('actionId: $actionId, ') ..write('position: $position, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } } class MediaItems extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; MediaItems(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); late final GeneratedColumn title = GeneratedColumn( 'title', aliasedName, false, additionalChecks: GeneratedColumn.checkTextLength(minTextLength: 3, maxTextLength: 32), type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn description = GeneratedColumn( 'body', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn reference = GeneratedColumn( 'reference', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn type = GeneratedColumn( 'type', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: Variable(DateTime.now())); @override List get $columns => [id, title, description, reference, type, createdAt]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'media_items'; @override Set get $primaryKey => {id}; @override MediaItemsData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return MediaItemsData( id: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}id'])!, title: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}title'])!, description: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}body'])!, reference: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}reference'])!, type: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}type'])!, createdAt: attachedDatabase.typeMapping .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, ); } @override MediaItems createAlias(String alias) { return MediaItems(attachedDatabase, alias); } } class MediaItemsData extends DataClass implements Insertable { final int id; final String title; final String description; final String reference; final String type; final DateTime createdAt; const MediaItemsData( {required this.id, required this.title, required this.description, required this.reference, required this.type, required this.createdAt}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['title'] = Variable(title); map['body'] = Variable(description); map['reference'] = Variable(reference); map['type'] = Variable(type); map['created_at'] = Variable(createdAt); return map; } MediaItemsCompanion toCompanion(bool nullToAbsent) { return MediaItemsCompanion( id: Value(id), title: Value(title), description: Value(description), reference: Value(reference), type: Value(type), createdAt: Value(createdAt), ); } factory MediaItemsData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return MediaItemsData( id: serializer.fromJson(json['id']), title: serializer.fromJson(json['title']), description: serializer.fromJson(json['description']), reference: serializer.fromJson(json['reference']), type: serializer.fromJson(json['type']), createdAt: serializer.fromJson(json['createdAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'title': serializer.toJson(title), 'description': serializer.toJson(description), 'reference': serializer.toJson(reference), 'type': serializer.toJson(type), 'createdAt': serializer.toJson(createdAt), }; } MediaItemsData copyWith( {int? id, String? title, String? description, String? reference, String? type, DateTime? createdAt}) => MediaItemsData( id: id ?? this.id, title: title ?? this.title, description: description ?? this.description, reference: reference ?? this.reference, type: type ?? this.type, createdAt: createdAt ?? this.createdAt, ); MediaItemsData copyWithCompanion(MediaItemsCompanion data) { return MediaItemsData( id: data.id.present ? data.id.value : this.id, title: data.title.present ? data.title.value : this.title, description: data.description.present ? data.description.value : this.description, reference: data.reference.present ? data.reference.value : this.reference, type: data.type.present ? data.type.value : this.type, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, ); } @override String toString() { return (StringBuffer('MediaItemsData(') ..write('id: $id, ') ..write('title: $title, ') ..write('description: $description, ') ..write('reference: $reference, ') ..write('type: $type, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, title, description, reference, type, createdAt); @override bool operator ==(Object other) => identical(this, other) || (other is MediaItemsData && other.id == this.id && other.title == this.title && other.description == this.description && other.reference == this.reference && other.type == this.type && other.createdAt == this.createdAt); } class MediaItemsCompanion extends UpdateCompanion { final Value id; final Value title; final Value description; final Value reference; final Value type; final Value createdAt; const MediaItemsCompanion({ this.id = const Value.absent(), this.title = const Value.absent(), this.description = const Value.absent(), this.reference = const Value.absent(), this.type = const Value.absent(), this.createdAt = const Value.absent(), }); MediaItemsCompanion.insert({ this.id = const Value.absent(), required String title, required String description, required String reference, required String type, this.createdAt = const Value.absent(), }) : title = Value(title), description = Value(description), reference = Value(reference), type = Value(type); static Insertable custom({ Expression? id, Expression? title, Expression? description, Expression? reference, Expression? type, Expression? createdAt, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (title != null) 'title': title, if (description != null) 'body': description, if (reference != null) 'reference': reference, if (type != null) 'type': type, if (createdAt != null) 'created_at': createdAt, }); } MediaItemsCompanion copyWith( {Value? id, Value? title, Value? description, Value? reference, Value? type, Value? createdAt}) { return MediaItemsCompanion( id: id ?? this.id, title: title ?? this.title, description: description ?? this.description, reference: reference ?? this.reference, type: type ?? this.type, createdAt: createdAt ?? this.createdAt, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (title.present) { map['title'] = Variable(title.value); } if (description.present) { map['body'] = Variable(description.value); } if (reference.present) { map['reference'] = Variable(reference.value); } if (type.present) { map['type'] = Variable(type.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } return map; } @override String toString() { return (StringBuffer('MediaItemsCompanion(') ..write('id: $id, ') ..write('title: $title, ') ..write('description: $description, ') ..write('reference: $reference, ') ..write('type: $type, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } } class ObjectMediaItems extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; ObjectMediaItems(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT')); late final GeneratedColumn objectId = GeneratedColumn( 'object_id', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true); late final GeneratedColumn objectType = GeneratedColumn( 'object_type', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn mediaId = GeneratedColumn( 'media_id', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways( 'REFERENCES media_items (id) ON DELETE CASCADE')); late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: Variable(DateTime.now())); @override List get $columns => [id, objectId, objectType, mediaId, createdAt]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'object_media_items'; @override Set get $primaryKey => {id}; @override ObjectMediaItemsData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return ObjectMediaItemsData( id: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}id'])!, objectId: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}object_id'])!, objectType: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}object_type'])!, mediaId: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}media_id'])!, createdAt: attachedDatabase.typeMapping .read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, ); } @override ObjectMediaItems createAlias(String alias) { return ObjectMediaItems(attachedDatabase, alias); } } class ObjectMediaItemsData extends DataClass implements Insertable { final int id; final int objectId; final String objectType; final int mediaId; final DateTime createdAt; const ObjectMediaItemsData( {required this.id, required this.objectId, required this.objectType, required this.mediaId, required this.createdAt}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['object_id'] = Variable(objectId); map['object_type'] = Variable(objectType); map['media_id'] = Variable(mediaId); map['created_at'] = Variable(createdAt); return map; } ObjectMediaItemsCompanion toCompanion(bool nullToAbsent) { return ObjectMediaItemsCompanion( id: Value(id), objectId: Value(objectId), objectType: Value(objectType), mediaId: Value(mediaId), createdAt: Value(createdAt), ); } factory ObjectMediaItemsData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return ObjectMediaItemsData( id: serializer.fromJson(json['id']), objectId: serializer.fromJson(json['objectId']), objectType: serializer.fromJson(json['objectType']), mediaId: serializer.fromJson(json['mediaId']), createdAt: serializer.fromJson(json['createdAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'objectId': serializer.toJson(objectId), 'objectType': serializer.toJson(objectType), 'mediaId': serializer.toJson(mediaId), 'createdAt': serializer.toJson(createdAt), }; } ObjectMediaItemsData copyWith( {int? id, int? objectId, String? objectType, int? mediaId, DateTime? createdAt}) => ObjectMediaItemsData( id: id ?? this.id, objectId: objectId ?? this.objectId, objectType: objectType ?? this.objectType, mediaId: mediaId ?? this.mediaId, createdAt: createdAt ?? this.createdAt, ); ObjectMediaItemsData copyWithCompanion(ObjectMediaItemsCompanion data) { return ObjectMediaItemsData( id: data.id.present ? data.id.value : this.id, objectId: data.objectId.present ? data.objectId.value : this.objectId, objectType: data.objectType.present ? data.objectType.value : this.objectType, mediaId: data.mediaId.present ? data.mediaId.value : this.mediaId, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, ); } @override String toString() { return (StringBuffer('ObjectMediaItemsData(') ..write('id: $id, ') ..write('objectId: $objectId, ') ..write('objectType: $objectType, ') ..write('mediaId: $mediaId, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, objectId, objectType, mediaId, createdAt); @override bool operator ==(Object other) => identical(this, other) || (other is ObjectMediaItemsData && other.id == this.id && other.objectId == this.objectId && other.objectType == this.objectType && other.mediaId == this.mediaId && other.createdAt == this.createdAt); } class ObjectMediaItemsCompanion extends UpdateCompanion { final Value id; final Value objectId; final Value objectType; final Value mediaId; final Value createdAt; const ObjectMediaItemsCompanion({ this.id = const Value.absent(), this.objectId = const Value.absent(), this.objectType = const Value.absent(), this.mediaId = const Value.absent(), this.createdAt = const Value.absent(), }); ObjectMediaItemsCompanion.insert({ this.id = const Value.absent(), required int objectId, required String objectType, required int mediaId, this.createdAt = const Value.absent(), }) : objectId = Value(objectId), objectType = Value(objectType), mediaId = Value(mediaId); static Insertable custom({ Expression? id, Expression? objectId, Expression? objectType, Expression? mediaId, Expression? createdAt, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (objectId != null) 'object_id': objectId, if (objectType != null) 'object_type': objectType, if (mediaId != null) 'media_id': mediaId, if (createdAt != null) 'created_at': createdAt, }); } ObjectMediaItemsCompanion copyWith( {Value? id, Value? objectId, Value? objectType, Value? mediaId, Value? createdAt}) { return ObjectMediaItemsCompanion( id: id ?? this.id, objectId: objectId ?? this.objectId, objectType: objectType ?? this.objectType, mediaId: mediaId ?? this.mediaId, createdAt: createdAt ?? this.createdAt, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (objectId.present) { map['object_id'] = Variable(objectId.value); } if (objectType.present) { map['object_type'] = Variable(objectType.value); } if (mediaId.present) { map['media_id'] = Variable(mediaId.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } return map; } @override String toString() { return (StringBuffer('ObjectMediaItemsCompanion(') ..write('id: $id, ') ..write('objectId: $objectId, ') ..write('objectType: $objectType, ') ..write('mediaId: $mediaId, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } } class DatabaseAtV13 extends GeneratedDatabase { DatabaseAtV13(QueryExecutor e) : super(e); late final Sessions sessions = Sessions(this); late final Activities activities = Activities(this); late final SessionActivities sessionActivities = SessionActivities(this); late final Actions actions = Actions(this); late final ActivityActions activityActions = ActivityActions(this); late final MediaItems mediaItems = MediaItems(this); late final ObjectMediaItems objectMediaItems = ObjectMediaItems(this); @override Iterable> get allTables => allSchemaEntities.whereType>(); @override List get allSchemaEntities => [ sessions, activities, sessionActivities, actions, activityActions, mediaItems, objectMediaItems ]; @override int get schemaVersion => 13; }