focus-flow/packages/scheduler_persistence_sqlite/lib/src/scheduler_db.g.dart

9758 lines
389 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'scheduler_db.dart';
// ignore_for_file: type=lint
mixin _$TaskDaoMixin on DatabaseAccessor<SchedulerDb> {
$TasksTable get tasks => attachedDatabase.tasks;
TaskDaoManager get managers => TaskDaoManager(this);
}
class TaskDaoManager {
final _$TaskDaoMixin _db;
TaskDaoManager(this._db);
$$TasksTableTableManager get tasks =>
$$TasksTableTableManager(_db.attachedDatabase, _db.tasks);
}
mixin _$ProjectDaoMixin on DatabaseAccessor<SchedulerDb> {
$ProjectsTable get projects => attachedDatabase.projects;
ProjectDaoManager get managers => ProjectDaoManager(this);
}
class ProjectDaoManager {
final _$ProjectDaoMixin _db;
ProjectDaoManager(this._db);
$$ProjectsTableTableManager get projects =>
$$ProjectsTableTableManager(_db.attachedDatabase, _db.projects);
}
mixin _$LockedBlockDaoMixin on DatabaseAccessor<SchedulerDb> {
$LockedBlocksTable get lockedBlocks => attachedDatabase.lockedBlocks;
$LockedOverridesTable get lockedOverrides => attachedDatabase.lockedOverrides;
LockedBlockDaoManager get managers => LockedBlockDaoManager(this);
}
class LockedBlockDaoManager {
final _$LockedBlockDaoMixin _db;
LockedBlockDaoManager(this._db);
$$LockedBlocksTableTableManager get lockedBlocks =>
$$LockedBlocksTableTableManager(_db.attachedDatabase, _db.lockedBlocks);
$$LockedOverridesTableTableManager get lockedOverrides =>
$$LockedOverridesTableTableManager(
_db.attachedDatabase, _db.lockedOverrides);
}
mixin _$SettingsDaoMixin on DatabaseAccessor<SchedulerDb> {
$SettingsTableTable get settingsTable => attachedDatabase.settingsTable;
SettingsDaoManager get managers => SettingsDaoManager(this);
}
class SettingsDaoManager {
final _$SettingsDaoMixin _db;
SettingsDaoManager(this._db);
$$SettingsTableTableTableManager get settingsTable =>
$$SettingsTableTableTableManager(_db.attachedDatabase, _db.settingsTable);
}
mixin _$SnapshotDaoMixin on DatabaseAccessor<SchedulerDb> {
$SnapshotsTable get snapshots => attachedDatabase.snapshots;
SnapshotDaoManager get managers => SnapshotDaoManager(this);
}
class SnapshotDaoManager {
final _$SnapshotDaoMixin _db;
SnapshotDaoManager(this._db);
$$SnapshotsTableTableManager get snapshots =>
$$SnapshotsTableTableManager(_db.attachedDatabase, _db.snapshots);
}
class $TasksTable extends Tasks with TableInfo<$TasksTable, TaskRow> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$TasksTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _idMeta = const VerificationMeta('id');
@override
late final GeneratedColumn<String> id = GeneratedColumn<String>(
'id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _ownerIdMeta =
const VerificationMeta('ownerId');
@override
late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(
'owner_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _titleMeta = const VerificationMeta('title');
@override
late final GeneratedColumn<String> title = GeneratedColumn<String>(
'title', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _projectIdMeta =
const VerificationMeta('projectId');
@override
late final GeneratedColumn<String> projectId = GeneratedColumn<String>(
'project_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _parentIdMeta =
const VerificationMeta('parentId');
@override
late final GeneratedColumn<String> parentId = GeneratedColumn<String>(
'parent_id', aliasedName, true,
type: DriftSqlType.string, requiredDuringInsert: false);
static const VerificationMeta _typeMeta = const VerificationMeta('type');
@override
late final GeneratedColumn<String> type = GeneratedColumn<String>(
'type', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _statusMeta = const VerificationMeta('status');
@override
late final GeneratedColumn<String> status = GeneratedColumn<String>(
'status', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _priorityMeta =
const VerificationMeta('priority');
@override
late final GeneratedColumn<String> priority = GeneratedColumn<String>(
'priority', aliasedName, true,
type: DriftSqlType.string, requiredDuringInsert: false);
static const VerificationMeta _rewardMeta = const VerificationMeta('reward');
@override
late final GeneratedColumn<String> reward = GeneratedColumn<String>(
'reward', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _difficultyMeta =
const VerificationMeta('difficulty');
@override
late final GeneratedColumn<String> difficulty = GeneratedColumn<String>(
'difficulty', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _durationMinutesMeta =
const VerificationMeta('durationMinutes');
@override
late final GeneratedColumn<int> durationMinutes = GeneratedColumn<int>(
'duration_minutes', aliasedName, true,
type: DriftSqlType.int, requiredDuringInsert: false);
static const VerificationMeta _scheduledStartUtcMeta =
const VerificationMeta('scheduledStartUtc');
@override
late final GeneratedColumn<DateTime> scheduledStartUtc =
GeneratedColumn<DateTime>('scheduled_start_utc', aliasedName, true,
type: DriftSqlType.dateTime, requiredDuringInsert: false);
static const VerificationMeta _scheduledEndUtcMeta =
const VerificationMeta('scheduledEndUtc');
@override
late final GeneratedColumn<DateTime> scheduledEndUtc =
GeneratedColumn<DateTime>('scheduled_end_utc', aliasedName, true,
type: DriftSqlType.dateTime, requiredDuringInsert: false);
static const VerificationMeta _actualStartUtcMeta =
const VerificationMeta('actualStartUtc');
@override
late final GeneratedColumn<DateTime> actualStartUtc =
GeneratedColumn<DateTime>('actual_start_utc', aliasedName, true,
type: DriftSqlType.dateTime, requiredDuringInsert: false);
static const VerificationMeta _actualEndUtcMeta =
const VerificationMeta('actualEndUtc');
@override
late final GeneratedColumn<DateTime> actualEndUtc = GeneratedColumn<DateTime>(
'actual_end_utc', aliasedName, true,
type: DriftSqlType.dateTime, requiredDuringInsert: false);
static const VerificationMeta _completedAtUtcMeta =
const VerificationMeta('completedAtUtc');
@override
late final GeneratedColumn<DateTime> completedAtUtc =
GeneratedColumn<DateTime>('completed_at_utc', aliasedName, true,
type: DriftSqlType.dateTime, requiredDuringInsert: false);
static const VerificationMeta _backlogTagsJsonMeta =
const VerificationMeta('backlogTagsJson');
@override
late final GeneratedColumn<String> backlogTagsJson = GeneratedColumn<String>(
'backlog_tags_json', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _reminderOverrideMeta =
const VerificationMeta('reminderOverride');
@override
late final GeneratedColumn<String> reminderOverride = GeneratedColumn<String>(
'reminder_override', aliasedName, true,
type: DriftSqlType.string, requiredDuringInsert: false);
static const VerificationMeta _statsJsonMeta =
const VerificationMeta('statsJson');
@override
late final GeneratedColumn<String> statsJson = GeneratedColumn<String>(
'stats_json', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _backlogEnteredAtUtcMeta =
const VerificationMeta('backlogEnteredAtUtc');
@override
late final GeneratedColumn<DateTime> backlogEnteredAtUtc =
GeneratedColumn<DateTime>('backlog_entered_at_utc', aliasedName, true,
type: DriftSqlType.dateTime, requiredDuringInsert: false);
static const VerificationMeta _backlogEnteredProvenanceMeta =
const VerificationMeta('backlogEnteredProvenance');
@override
late final GeneratedColumn<String> backlogEnteredProvenance =
GeneratedColumn<String>('backlog_entered_provenance', aliasedName, true,
type: DriftSqlType.string, requiredDuringInsert: false);
static const VerificationMeta _revisionMeta =
const VerificationMeta('revision');
@override
late final GeneratedColumn<int> revision = GeneratedColumn<int>(
'revision', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _createdAtUtcMeta =
const VerificationMeta('createdAtUtc');
@override
late final GeneratedColumn<DateTime> createdAtUtc = GeneratedColumn<DateTime>(
'created_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
static const VerificationMeta _updatedAtUtcMeta =
const VerificationMeta('updatedAtUtc');
@override
late final GeneratedColumn<DateTime> updatedAtUtc = GeneratedColumn<DateTime>(
'updated_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
@override
List<GeneratedColumn> get $columns => [
id,
ownerId,
title,
projectId,
parentId,
type,
status,
priority,
reward,
difficulty,
durationMinutes,
scheduledStartUtc,
scheduledEndUtc,
actualStartUtc,
actualEndUtc,
completedAtUtc,
backlogTagsJson,
reminderOverride,
statsJson,
backlogEnteredAtUtc,
backlogEnteredProvenance,
revision,
createdAtUtc,
updatedAtUtc
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'tasks';
@override
VerificationContext validateIntegrity(Insertable<TaskRow> instance,
{bool isInserting = false}) {
final context = VerificationContext();
final data = instance.toColumns(true);
if (data.containsKey('id')) {
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
} else if (isInserting) {
context.missing(_idMeta);
}
if (data.containsKey('owner_id')) {
context.handle(_ownerIdMeta,
ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta));
} else if (isInserting) {
context.missing(_ownerIdMeta);
}
if (data.containsKey('title')) {
context.handle(
_titleMeta, title.isAcceptableOrUnknown(data['title']!, _titleMeta));
} else if (isInserting) {
context.missing(_titleMeta);
}
if (data.containsKey('project_id')) {
context.handle(_projectIdMeta,
projectId.isAcceptableOrUnknown(data['project_id']!, _projectIdMeta));
} else if (isInserting) {
context.missing(_projectIdMeta);
}
if (data.containsKey('parent_id')) {
context.handle(_parentIdMeta,
parentId.isAcceptableOrUnknown(data['parent_id']!, _parentIdMeta));
}
if (data.containsKey('type')) {
context.handle(
_typeMeta, type.isAcceptableOrUnknown(data['type']!, _typeMeta));
} else if (isInserting) {
context.missing(_typeMeta);
}
if (data.containsKey('status')) {
context.handle(_statusMeta,
status.isAcceptableOrUnknown(data['status']!, _statusMeta));
} else if (isInserting) {
context.missing(_statusMeta);
}
if (data.containsKey('priority')) {
context.handle(_priorityMeta,
priority.isAcceptableOrUnknown(data['priority']!, _priorityMeta));
}
if (data.containsKey('reward')) {
context.handle(_rewardMeta,
reward.isAcceptableOrUnknown(data['reward']!, _rewardMeta));
} else if (isInserting) {
context.missing(_rewardMeta);
}
if (data.containsKey('difficulty')) {
context.handle(
_difficultyMeta,
difficulty.isAcceptableOrUnknown(
data['difficulty']!, _difficultyMeta));
} else if (isInserting) {
context.missing(_difficultyMeta);
}
if (data.containsKey('duration_minutes')) {
context.handle(
_durationMinutesMeta,
durationMinutes.isAcceptableOrUnknown(
data['duration_minutes']!, _durationMinutesMeta));
}
if (data.containsKey('scheduled_start_utc')) {
context.handle(
_scheduledStartUtcMeta,
scheduledStartUtc.isAcceptableOrUnknown(
data['scheduled_start_utc']!, _scheduledStartUtcMeta));
}
if (data.containsKey('scheduled_end_utc')) {
context.handle(
_scheduledEndUtcMeta,
scheduledEndUtc.isAcceptableOrUnknown(
data['scheduled_end_utc']!, _scheduledEndUtcMeta));
}
if (data.containsKey('actual_start_utc')) {
context.handle(
_actualStartUtcMeta,
actualStartUtc.isAcceptableOrUnknown(
data['actual_start_utc']!, _actualStartUtcMeta));
}
if (data.containsKey('actual_end_utc')) {
context.handle(
_actualEndUtcMeta,
actualEndUtc.isAcceptableOrUnknown(
data['actual_end_utc']!, _actualEndUtcMeta));
}
if (data.containsKey('completed_at_utc')) {
context.handle(
_completedAtUtcMeta,
completedAtUtc.isAcceptableOrUnknown(
data['completed_at_utc']!, _completedAtUtcMeta));
}
if (data.containsKey('backlog_tags_json')) {
context.handle(
_backlogTagsJsonMeta,
backlogTagsJson.isAcceptableOrUnknown(
data['backlog_tags_json']!, _backlogTagsJsonMeta));
} else if (isInserting) {
context.missing(_backlogTagsJsonMeta);
}
if (data.containsKey('reminder_override')) {
context.handle(
_reminderOverrideMeta,
reminderOverride.isAcceptableOrUnknown(
data['reminder_override']!, _reminderOverrideMeta));
}
if (data.containsKey('stats_json')) {
context.handle(_statsJsonMeta,
statsJson.isAcceptableOrUnknown(data['stats_json']!, _statsJsonMeta));
} else if (isInserting) {
context.missing(_statsJsonMeta);
}
if (data.containsKey('backlog_entered_at_utc')) {
context.handle(
_backlogEnteredAtUtcMeta,
backlogEnteredAtUtc.isAcceptableOrUnknown(
data['backlog_entered_at_utc']!, _backlogEnteredAtUtcMeta));
}
if (data.containsKey('backlog_entered_provenance')) {
context.handle(
_backlogEnteredProvenanceMeta,
backlogEnteredProvenance.isAcceptableOrUnknown(
data['backlog_entered_provenance']!,
_backlogEnteredProvenanceMeta));
}
if (data.containsKey('revision')) {
context.handle(_revisionMeta,
revision.isAcceptableOrUnknown(data['revision']!, _revisionMeta));
} else if (isInserting) {
context.missing(_revisionMeta);
}
if (data.containsKey('created_at_utc')) {
context.handle(
_createdAtUtcMeta,
createdAtUtc.isAcceptableOrUnknown(
data['created_at_utc']!, _createdAtUtcMeta));
} else if (isInserting) {
context.missing(_createdAtUtcMeta);
}
if (data.containsKey('updated_at_utc')) {
context.handle(
_updatedAtUtcMeta,
updatedAtUtc.isAcceptableOrUnknown(
data['updated_at_utc']!, _updatedAtUtcMeta));
} else if (isInserting) {
context.missing(_updatedAtUtcMeta);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {id};
@override
TaskRow map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return TaskRow(
id: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}id'])!,
ownerId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,
title: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}title'])!,
projectId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}project_id'])!,
parentId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}parent_id']),
type: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}type'])!,
status: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}status'])!,
priority: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}priority']),
reward: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}reward'])!,
difficulty: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}difficulty'])!,
durationMinutes: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}duration_minutes']),
scheduledStartUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}scheduled_start_utc']),
scheduledEndUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}scheduled_end_utc']),
actualStartUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}actual_start_utc']),
actualEndUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}actual_end_utc']),
completedAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}completed_at_utc']),
backlogTagsJson: attachedDatabase.typeMapping.read(
DriftSqlType.string, data['${effectivePrefix}backlog_tags_json'])!,
reminderOverride: attachedDatabase.typeMapping.read(
DriftSqlType.string, data['${effectivePrefix}reminder_override']),
statsJson: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}stats_json'])!,
backlogEnteredAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}backlog_entered_at_utc']),
backlogEnteredProvenance: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}backlog_entered_provenance']),
revision: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}revision'])!,
createdAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}created_at_utc'])!,
updatedAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}updated_at_utc'])!,
);
}
@override
$TasksTable createAlias(String alias) {
return $TasksTable(attachedDatabase, alias);
}
}
class TaskRow extends DataClass implements Insertable<TaskRow> {
/// Returns the derived `id` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String id;
/// Returns the derived `ownerId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String ownerId;
/// Returns the derived `title` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String title;
/// Returns the derived `projectId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String projectId;
/// Returns the derived `parentId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String? parentId;
/// Returns the derived `type` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String type;
/// Returns the derived `status` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String status;
/// Returns the derived `priority` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String? priority;
/// Returns the derived `reward` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String reward;
/// Returns the derived `difficulty` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String difficulty;
/// Returns the derived `durationMinutes` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final int? durationMinutes;
/// Returns the derived `scheduledStartUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime? scheduledStartUtc;
/// Returns the derived `scheduledEndUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime? scheduledEndUtc;
/// Returns the derived `actualStartUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime? actualStartUtc;
/// Returns the derived `actualEndUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime? actualEndUtc;
/// Returns the derived `completedAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime? completedAtUtc;
/// Converts scheduler data for `backlogTagsJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String backlogTagsJson;
/// Returns the derived `reminderOverride` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String? reminderOverride;
/// Converts scheduler data for `statsJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String statsJson;
/// Returns the derived `backlogEnteredAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime? backlogEnteredAtUtc;
/// Returns the derived `backlogEnteredProvenance` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String? backlogEnteredProvenance;
/// Returns the derived `revision` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final int revision;
/// Returns the derived `createdAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime createdAtUtc;
/// Returns the derived `updatedAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime updatedAtUtc;
const TaskRow(
{required this.id,
required this.ownerId,
required this.title,
required this.projectId,
this.parentId,
required this.type,
required this.status,
this.priority,
required this.reward,
required this.difficulty,
this.durationMinutes,
this.scheduledStartUtc,
this.scheduledEndUtc,
this.actualStartUtc,
this.actualEndUtc,
this.completedAtUtc,
required this.backlogTagsJson,
this.reminderOverride,
required this.statsJson,
this.backlogEnteredAtUtc,
this.backlogEnteredProvenance,
required this.revision,
required this.createdAtUtc,
required this.updatedAtUtc});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<String>(id);
map['owner_id'] = Variable<String>(ownerId);
map['title'] = Variable<String>(title);
map['project_id'] = Variable<String>(projectId);
if (!nullToAbsent || parentId != null) {
map['parent_id'] = Variable<String>(parentId);
}
map['type'] = Variable<String>(type);
map['status'] = Variable<String>(status);
if (!nullToAbsent || priority != null) {
map['priority'] = Variable<String>(priority);
}
map['reward'] = Variable<String>(reward);
map['difficulty'] = Variable<String>(difficulty);
if (!nullToAbsent || durationMinutes != null) {
map['duration_minutes'] = Variable<int>(durationMinutes);
}
if (!nullToAbsent || scheduledStartUtc != null) {
map['scheduled_start_utc'] = Variable<DateTime>(scheduledStartUtc);
}
if (!nullToAbsent || scheduledEndUtc != null) {
map['scheduled_end_utc'] = Variable<DateTime>(scheduledEndUtc);
}
if (!nullToAbsent || actualStartUtc != null) {
map['actual_start_utc'] = Variable<DateTime>(actualStartUtc);
}
if (!nullToAbsent || actualEndUtc != null) {
map['actual_end_utc'] = Variable<DateTime>(actualEndUtc);
}
if (!nullToAbsent || completedAtUtc != null) {
map['completed_at_utc'] = Variable<DateTime>(completedAtUtc);
}
map['backlog_tags_json'] = Variable<String>(backlogTagsJson);
if (!nullToAbsent || reminderOverride != null) {
map['reminder_override'] = Variable<String>(reminderOverride);
}
map['stats_json'] = Variable<String>(statsJson);
if (!nullToAbsent || backlogEnteredAtUtc != null) {
map['backlog_entered_at_utc'] = Variable<DateTime>(backlogEnteredAtUtc);
}
if (!nullToAbsent || backlogEnteredProvenance != null) {
map['backlog_entered_provenance'] =
Variable<String>(backlogEnteredProvenance);
}
map['revision'] = Variable<int>(revision);
map['created_at_utc'] = Variable<DateTime>(createdAtUtc);
map['updated_at_utc'] = Variable<DateTime>(updatedAtUtc);
return map;
}
TasksCompanion toCompanion(bool nullToAbsent) {
return TasksCompanion(
id: Value(id),
ownerId: Value(ownerId),
title: Value(title),
projectId: Value(projectId),
parentId: parentId == null && nullToAbsent
? const Value.absent()
: Value(parentId),
type: Value(type),
status: Value(status),
priority: priority == null && nullToAbsent
? const Value.absent()
: Value(priority),
reward: Value(reward),
difficulty: Value(difficulty),
durationMinutes: durationMinutes == null && nullToAbsent
? const Value.absent()
: Value(durationMinutes),
scheduledStartUtc: scheduledStartUtc == null && nullToAbsent
? const Value.absent()
: Value(scheduledStartUtc),
scheduledEndUtc: scheduledEndUtc == null && nullToAbsent
? const Value.absent()
: Value(scheduledEndUtc),
actualStartUtc: actualStartUtc == null && nullToAbsent
? const Value.absent()
: Value(actualStartUtc),
actualEndUtc: actualEndUtc == null && nullToAbsent
? const Value.absent()
: Value(actualEndUtc),
completedAtUtc: completedAtUtc == null && nullToAbsent
? const Value.absent()
: Value(completedAtUtc),
backlogTagsJson: Value(backlogTagsJson),
reminderOverride: reminderOverride == null && nullToAbsent
? const Value.absent()
: Value(reminderOverride),
statsJson: Value(statsJson),
backlogEnteredAtUtc: backlogEnteredAtUtc == null && nullToAbsent
? const Value.absent()
: Value(backlogEnteredAtUtc),
backlogEnteredProvenance: backlogEnteredProvenance == null && nullToAbsent
? const Value.absent()
: Value(backlogEnteredProvenance),
revision: Value(revision),
createdAtUtc: Value(createdAtUtc),
updatedAtUtc: Value(updatedAtUtc),
);
}
factory TaskRow.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return TaskRow(
id: serializer.fromJson<String>(json['id']),
ownerId: serializer.fromJson<String>(json['ownerId']),
title: serializer.fromJson<String>(json['title']),
projectId: serializer.fromJson<String>(json['projectId']),
parentId: serializer.fromJson<String?>(json['parentId']),
type: serializer.fromJson<String>(json['type']),
status: serializer.fromJson<String>(json['status']),
priority: serializer.fromJson<String?>(json['priority']),
reward: serializer.fromJson<String>(json['reward']),
difficulty: serializer.fromJson<String>(json['difficulty']),
durationMinutes: serializer.fromJson<int?>(json['durationMinutes']),
scheduledStartUtc:
serializer.fromJson<DateTime?>(json['scheduledStartUtc']),
scheduledEndUtc: serializer.fromJson<DateTime?>(json['scheduledEndUtc']),
actualStartUtc: serializer.fromJson<DateTime?>(json['actualStartUtc']),
actualEndUtc: serializer.fromJson<DateTime?>(json['actualEndUtc']),
completedAtUtc: serializer.fromJson<DateTime?>(json['completedAtUtc']),
backlogTagsJson: serializer.fromJson<String>(json['backlogTagsJson']),
reminderOverride: serializer.fromJson<String?>(json['reminderOverride']),
statsJson: serializer.fromJson<String>(json['statsJson']),
backlogEnteredAtUtc:
serializer.fromJson<DateTime?>(json['backlogEnteredAtUtc']),
backlogEnteredProvenance:
serializer.fromJson<String?>(json['backlogEnteredProvenance']),
revision: serializer.fromJson<int>(json['revision']),
createdAtUtc: serializer.fromJson<DateTime>(json['createdAtUtc']),
updatedAtUtc: serializer.fromJson<DateTime>(json['updatedAtUtc']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'id': serializer.toJson<String>(id),
'ownerId': serializer.toJson<String>(ownerId),
'title': serializer.toJson<String>(title),
'projectId': serializer.toJson<String>(projectId),
'parentId': serializer.toJson<String?>(parentId),
'type': serializer.toJson<String>(type),
'status': serializer.toJson<String>(status),
'priority': serializer.toJson<String?>(priority),
'reward': serializer.toJson<String>(reward),
'difficulty': serializer.toJson<String>(difficulty),
'durationMinutes': serializer.toJson<int?>(durationMinutes),
'scheduledStartUtc': serializer.toJson<DateTime?>(scheduledStartUtc),
'scheduledEndUtc': serializer.toJson<DateTime?>(scheduledEndUtc),
'actualStartUtc': serializer.toJson<DateTime?>(actualStartUtc),
'actualEndUtc': serializer.toJson<DateTime?>(actualEndUtc),
'completedAtUtc': serializer.toJson<DateTime?>(completedAtUtc),
'backlogTagsJson': serializer.toJson<String>(backlogTagsJson),
'reminderOverride': serializer.toJson<String?>(reminderOverride),
'statsJson': serializer.toJson<String>(statsJson),
'backlogEnteredAtUtc': serializer.toJson<DateTime?>(backlogEnteredAtUtc),
'backlogEnteredProvenance':
serializer.toJson<String?>(backlogEnteredProvenance),
'revision': serializer.toJson<int>(revision),
'createdAtUtc': serializer.toJson<DateTime>(createdAtUtc),
'updatedAtUtc': serializer.toJson<DateTime>(updatedAtUtc),
};
}
TaskRow copyWith(
{String? id,
String? ownerId,
String? title,
String? projectId,
Value<String?> parentId = const Value.absent(),
String? type,
String? status,
Value<String?> priority = const Value.absent(),
String? reward,
String? difficulty,
Value<int?> durationMinutes = const Value.absent(),
Value<DateTime?> scheduledStartUtc = const Value.absent(),
Value<DateTime?> scheduledEndUtc = const Value.absent(),
Value<DateTime?> actualStartUtc = const Value.absent(),
Value<DateTime?> actualEndUtc = const Value.absent(),
Value<DateTime?> completedAtUtc = const Value.absent(),
String? backlogTagsJson,
Value<String?> reminderOverride = const Value.absent(),
String? statsJson,
Value<DateTime?> backlogEnteredAtUtc = const Value.absent(),
Value<String?> backlogEnteredProvenance = const Value.absent(),
int? revision,
DateTime? createdAtUtc,
DateTime? updatedAtUtc}) =>
TaskRow(
id: id ?? this.id,
ownerId: ownerId ?? this.ownerId,
title: title ?? this.title,
projectId: projectId ?? this.projectId,
parentId: parentId.present ? parentId.value : this.parentId,
type: type ?? this.type,
status: status ?? this.status,
priority: priority.present ? priority.value : this.priority,
reward: reward ?? this.reward,
difficulty: difficulty ?? this.difficulty,
durationMinutes: durationMinutes.present
? durationMinutes.value
: this.durationMinutes,
scheduledStartUtc: scheduledStartUtc.present
? scheduledStartUtc.value
: this.scheduledStartUtc,
scheduledEndUtc: scheduledEndUtc.present
? scheduledEndUtc.value
: this.scheduledEndUtc,
actualStartUtc:
actualStartUtc.present ? actualStartUtc.value : this.actualStartUtc,
actualEndUtc:
actualEndUtc.present ? actualEndUtc.value : this.actualEndUtc,
completedAtUtc:
completedAtUtc.present ? completedAtUtc.value : this.completedAtUtc,
backlogTagsJson: backlogTagsJson ?? this.backlogTagsJson,
reminderOverride: reminderOverride.present
? reminderOverride.value
: this.reminderOverride,
statsJson: statsJson ?? this.statsJson,
backlogEnteredAtUtc: backlogEnteredAtUtc.present
? backlogEnteredAtUtc.value
: this.backlogEnteredAtUtc,
backlogEnteredProvenance: backlogEnteredProvenance.present
? backlogEnteredProvenance.value
: this.backlogEnteredProvenance,
revision: revision ?? this.revision,
createdAtUtc: createdAtUtc ?? this.createdAtUtc,
updatedAtUtc: updatedAtUtc ?? this.updatedAtUtc,
);
TaskRow copyWithCompanion(TasksCompanion data) {
return TaskRow(
id: data.id.present ? data.id.value : this.id,
ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,
title: data.title.present ? data.title.value : this.title,
projectId: data.projectId.present ? data.projectId.value : this.projectId,
parentId: data.parentId.present ? data.parentId.value : this.parentId,
type: data.type.present ? data.type.value : this.type,
status: data.status.present ? data.status.value : this.status,
priority: data.priority.present ? data.priority.value : this.priority,
reward: data.reward.present ? data.reward.value : this.reward,
difficulty:
data.difficulty.present ? data.difficulty.value : this.difficulty,
durationMinutes: data.durationMinutes.present
? data.durationMinutes.value
: this.durationMinutes,
scheduledStartUtc: data.scheduledStartUtc.present
? data.scheduledStartUtc.value
: this.scheduledStartUtc,
scheduledEndUtc: data.scheduledEndUtc.present
? data.scheduledEndUtc.value
: this.scheduledEndUtc,
actualStartUtc: data.actualStartUtc.present
? data.actualStartUtc.value
: this.actualStartUtc,
actualEndUtc: data.actualEndUtc.present
? data.actualEndUtc.value
: this.actualEndUtc,
completedAtUtc: data.completedAtUtc.present
? data.completedAtUtc.value
: this.completedAtUtc,
backlogTagsJson: data.backlogTagsJson.present
? data.backlogTagsJson.value
: this.backlogTagsJson,
reminderOverride: data.reminderOverride.present
? data.reminderOverride.value
: this.reminderOverride,
statsJson: data.statsJson.present ? data.statsJson.value : this.statsJson,
backlogEnteredAtUtc: data.backlogEnteredAtUtc.present
? data.backlogEnteredAtUtc.value
: this.backlogEnteredAtUtc,
backlogEnteredProvenance: data.backlogEnteredProvenance.present
? data.backlogEnteredProvenance.value
: this.backlogEnteredProvenance,
revision: data.revision.present ? data.revision.value : this.revision,
createdAtUtc: data.createdAtUtc.present
? data.createdAtUtc.value
: this.createdAtUtc,
updatedAtUtc: data.updatedAtUtc.present
? data.updatedAtUtc.value
: this.updatedAtUtc,
);
}
@override
String toString() {
return (StringBuffer('TaskRow(')
..write('id: $id, ')
..write('ownerId: $ownerId, ')
..write('title: $title, ')
..write('projectId: $projectId, ')
..write('parentId: $parentId, ')
..write('type: $type, ')
..write('status: $status, ')
..write('priority: $priority, ')
..write('reward: $reward, ')
..write('difficulty: $difficulty, ')
..write('durationMinutes: $durationMinutes, ')
..write('scheduledStartUtc: $scheduledStartUtc, ')
..write('scheduledEndUtc: $scheduledEndUtc, ')
..write('actualStartUtc: $actualStartUtc, ')
..write('actualEndUtc: $actualEndUtc, ')
..write('completedAtUtc: $completedAtUtc, ')
..write('backlogTagsJson: $backlogTagsJson, ')
..write('reminderOverride: $reminderOverride, ')
..write('statsJson: $statsJson, ')
..write('backlogEnteredAtUtc: $backlogEnteredAtUtc, ')
..write('backlogEnteredProvenance: $backlogEnteredProvenance, ')
..write('revision: $revision, ')
..write('createdAtUtc: $createdAtUtc, ')
..write('updatedAtUtc: $updatedAtUtc')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hashAll([
id,
ownerId,
title,
projectId,
parentId,
type,
status,
priority,
reward,
difficulty,
durationMinutes,
scheduledStartUtc,
scheduledEndUtc,
actualStartUtc,
actualEndUtc,
completedAtUtc,
backlogTagsJson,
reminderOverride,
statsJson,
backlogEnteredAtUtc,
backlogEnteredProvenance,
revision,
createdAtUtc,
updatedAtUtc
]);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is TaskRow &&
other.id == this.id &&
other.ownerId == this.ownerId &&
other.title == this.title &&
other.projectId == this.projectId &&
other.parentId == this.parentId &&
other.type == this.type &&
other.status == this.status &&
other.priority == this.priority &&
other.reward == this.reward &&
other.difficulty == this.difficulty &&
other.durationMinutes == this.durationMinutes &&
other.scheduledStartUtc == this.scheduledStartUtc &&
other.scheduledEndUtc == this.scheduledEndUtc &&
other.actualStartUtc == this.actualStartUtc &&
other.actualEndUtc == this.actualEndUtc &&
other.completedAtUtc == this.completedAtUtc &&
other.backlogTagsJson == this.backlogTagsJson &&
other.reminderOverride == this.reminderOverride &&
other.statsJson == this.statsJson &&
other.backlogEnteredAtUtc == this.backlogEnteredAtUtc &&
other.backlogEnteredProvenance == this.backlogEnteredProvenance &&
other.revision == this.revision &&
other.createdAtUtc == this.createdAtUtc &&
other.updatedAtUtc == this.updatedAtUtc);
}
class TasksCompanion extends UpdateCompanion<TaskRow> {
final Value<String> id;
final Value<String> ownerId;
final Value<String> title;
final Value<String> projectId;
final Value<String?> parentId;
final Value<String> type;
final Value<String> status;
final Value<String?> priority;
final Value<String> reward;
final Value<String> difficulty;
final Value<int?> durationMinutes;
final Value<DateTime?> scheduledStartUtc;
final Value<DateTime?> scheduledEndUtc;
final Value<DateTime?> actualStartUtc;
final Value<DateTime?> actualEndUtc;
final Value<DateTime?> completedAtUtc;
final Value<String> backlogTagsJson;
final Value<String?> reminderOverride;
final Value<String> statsJson;
final Value<DateTime?> backlogEnteredAtUtc;
final Value<String?> backlogEnteredProvenance;
final Value<int> revision;
final Value<DateTime> createdAtUtc;
final Value<DateTime> updatedAtUtc;
final Value<int> rowid;
const TasksCompanion({
this.id = const Value.absent(),
this.ownerId = const Value.absent(),
this.title = const Value.absent(),
this.projectId = const Value.absent(),
this.parentId = const Value.absent(),
this.type = const Value.absent(),
this.status = const Value.absent(),
this.priority = const Value.absent(),
this.reward = const Value.absent(),
this.difficulty = const Value.absent(),
this.durationMinutes = const Value.absent(),
this.scheduledStartUtc = const Value.absent(),
this.scheduledEndUtc = const Value.absent(),
this.actualStartUtc = const Value.absent(),
this.actualEndUtc = const Value.absent(),
this.completedAtUtc = const Value.absent(),
this.backlogTagsJson = const Value.absent(),
this.reminderOverride = const Value.absent(),
this.statsJson = const Value.absent(),
this.backlogEnteredAtUtc = const Value.absent(),
this.backlogEnteredProvenance = const Value.absent(),
this.revision = const Value.absent(),
this.createdAtUtc = const Value.absent(),
this.updatedAtUtc = const Value.absent(),
this.rowid = const Value.absent(),
});
TasksCompanion.insert({
required String id,
required String ownerId,
required String title,
required String projectId,
this.parentId = const Value.absent(),
required String type,
required String status,
this.priority = const Value.absent(),
required String reward,
required String difficulty,
this.durationMinutes = const Value.absent(),
this.scheduledStartUtc = const Value.absent(),
this.scheduledEndUtc = const Value.absent(),
this.actualStartUtc = const Value.absent(),
this.actualEndUtc = const Value.absent(),
this.completedAtUtc = const Value.absent(),
required String backlogTagsJson,
this.reminderOverride = const Value.absent(),
required String statsJson,
this.backlogEnteredAtUtc = const Value.absent(),
this.backlogEnteredProvenance = const Value.absent(),
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
this.rowid = const Value.absent(),
}) : id = Value(id),
ownerId = Value(ownerId),
title = Value(title),
projectId = Value(projectId),
type = Value(type),
status = Value(status),
reward = Value(reward),
difficulty = Value(difficulty),
backlogTagsJson = Value(backlogTagsJson),
statsJson = Value(statsJson),
revision = Value(revision),
createdAtUtc = Value(createdAtUtc),
updatedAtUtc = Value(updatedAtUtc);
static Insertable<TaskRow> custom({
Expression<String>? id,
Expression<String>? ownerId,
Expression<String>? title,
Expression<String>? projectId,
Expression<String>? parentId,
Expression<String>? type,
Expression<String>? status,
Expression<String>? priority,
Expression<String>? reward,
Expression<String>? difficulty,
Expression<int>? durationMinutes,
Expression<DateTime>? scheduledStartUtc,
Expression<DateTime>? scheduledEndUtc,
Expression<DateTime>? actualStartUtc,
Expression<DateTime>? actualEndUtc,
Expression<DateTime>? completedAtUtc,
Expression<String>? backlogTagsJson,
Expression<String>? reminderOverride,
Expression<String>? statsJson,
Expression<DateTime>? backlogEnteredAtUtc,
Expression<String>? backlogEnteredProvenance,
Expression<int>? revision,
Expression<DateTime>? createdAtUtc,
Expression<DateTime>? updatedAtUtc,
Expression<int>? rowid,
}) {
return RawValuesInsertable({
if (id != null) 'id': id,
if (ownerId != null) 'owner_id': ownerId,
if (title != null) 'title': title,
if (projectId != null) 'project_id': projectId,
if (parentId != null) 'parent_id': parentId,
if (type != null) 'type': type,
if (status != null) 'status': status,
if (priority != null) 'priority': priority,
if (reward != null) 'reward': reward,
if (difficulty != null) 'difficulty': difficulty,
if (durationMinutes != null) 'duration_minutes': durationMinutes,
if (scheduledStartUtc != null) 'scheduled_start_utc': scheduledStartUtc,
if (scheduledEndUtc != null) 'scheduled_end_utc': scheduledEndUtc,
if (actualStartUtc != null) 'actual_start_utc': actualStartUtc,
if (actualEndUtc != null) 'actual_end_utc': actualEndUtc,
if (completedAtUtc != null) 'completed_at_utc': completedAtUtc,
if (backlogTagsJson != null) 'backlog_tags_json': backlogTagsJson,
if (reminderOverride != null) 'reminder_override': reminderOverride,
if (statsJson != null) 'stats_json': statsJson,
if (backlogEnteredAtUtc != null)
'backlog_entered_at_utc': backlogEnteredAtUtc,
if (backlogEnteredProvenance != null)
'backlog_entered_provenance': backlogEnteredProvenance,
if (revision != null) 'revision': revision,
if (createdAtUtc != null) 'created_at_utc': createdAtUtc,
if (updatedAtUtc != null) 'updated_at_utc': updatedAtUtc,
if (rowid != null) 'rowid': rowid,
});
}
TasksCompanion copyWith(
{Value<String>? id,
Value<String>? ownerId,
Value<String>? title,
Value<String>? projectId,
Value<String?>? parentId,
Value<String>? type,
Value<String>? status,
Value<String?>? priority,
Value<String>? reward,
Value<String>? difficulty,
Value<int?>? durationMinutes,
Value<DateTime?>? scheduledStartUtc,
Value<DateTime?>? scheduledEndUtc,
Value<DateTime?>? actualStartUtc,
Value<DateTime?>? actualEndUtc,
Value<DateTime?>? completedAtUtc,
Value<String>? backlogTagsJson,
Value<String?>? reminderOverride,
Value<String>? statsJson,
Value<DateTime?>? backlogEnteredAtUtc,
Value<String?>? backlogEnteredProvenance,
Value<int>? revision,
Value<DateTime>? createdAtUtc,
Value<DateTime>? updatedAtUtc,
Value<int>? rowid}) {
return TasksCompanion(
id: id ?? this.id,
ownerId: ownerId ?? this.ownerId,
title: title ?? this.title,
projectId: projectId ?? this.projectId,
parentId: parentId ?? this.parentId,
type: type ?? this.type,
status: status ?? this.status,
priority: priority ?? this.priority,
reward: reward ?? this.reward,
difficulty: difficulty ?? this.difficulty,
durationMinutes: durationMinutes ?? this.durationMinutes,
scheduledStartUtc: scheduledStartUtc ?? this.scheduledStartUtc,
scheduledEndUtc: scheduledEndUtc ?? this.scheduledEndUtc,
actualStartUtc: actualStartUtc ?? this.actualStartUtc,
actualEndUtc: actualEndUtc ?? this.actualEndUtc,
completedAtUtc: completedAtUtc ?? this.completedAtUtc,
backlogTagsJson: backlogTagsJson ?? this.backlogTagsJson,
reminderOverride: reminderOverride ?? this.reminderOverride,
statsJson: statsJson ?? this.statsJson,
backlogEnteredAtUtc: backlogEnteredAtUtc ?? this.backlogEnteredAtUtc,
backlogEnteredProvenance:
backlogEnteredProvenance ?? this.backlogEnteredProvenance,
revision: revision ?? this.revision,
createdAtUtc: createdAtUtc ?? this.createdAtUtc,
updatedAtUtc: updatedAtUtc ?? this.updatedAtUtc,
rowid: rowid ?? this.rowid,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (id.present) {
map['id'] = Variable<String>(id.value);
}
if (ownerId.present) {
map['owner_id'] = Variable<String>(ownerId.value);
}
if (title.present) {
map['title'] = Variable<String>(title.value);
}
if (projectId.present) {
map['project_id'] = Variable<String>(projectId.value);
}
if (parentId.present) {
map['parent_id'] = Variable<String>(parentId.value);
}
if (type.present) {
map['type'] = Variable<String>(type.value);
}
if (status.present) {
map['status'] = Variable<String>(status.value);
}
if (priority.present) {
map['priority'] = Variable<String>(priority.value);
}
if (reward.present) {
map['reward'] = Variable<String>(reward.value);
}
if (difficulty.present) {
map['difficulty'] = Variable<String>(difficulty.value);
}
if (durationMinutes.present) {
map['duration_minutes'] = Variable<int>(durationMinutes.value);
}
if (scheduledStartUtc.present) {
map['scheduled_start_utc'] = Variable<DateTime>(scheduledStartUtc.value);
}
if (scheduledEndUtc.present) {
map['scheduled_end_utc'] = Variable<DateTime>(scheduledEndUtc.value);
}
if (actualStartUtc.present) {
map['actual_start_utc'] = Variable<DateTime>(actualStartUtc.value);
}
if (actualEndUtc.present) {
map['actual_end_utc'] = Variable<DateTime>(actualEndUtc.value);
}
if (completedAtUtc.present) {
map['completed_at_utc'] = Variable<DateTime>(completedAtUtc.value);
}
if (backlogTagsJson.present) {
map['backlog_tags_json'] = Variable<String>(backlogTagsJson.value);
}
if (reminderOverride.present) {
map['reminder_override'] = Variable<String>(reminderOverride.value);
}
if (statsJson.present) {
map['stats_json'] = Variable<String>(statsJson.value);
}
if (backlogEnteredAtUtc.present) {
map['backlog_entered_at_utc'] =
Variable<DateTime>(backlogEnteredAtUtc.value);
}
if (backlogEnteredProvenance.present) {
map['backlog_entered_provenance'] =
Variable<String>(backlogEnteredProvenance.value);
}
if (revision.present) {
map['revision'] = Variable<int>(revision.value);
}
if (createdAtUtc.present) {
map['created_at_utc'] = Variable<DateTime>(createdAtUtc.value);
}
if (updatedAtUtc.present) {
map['updated_at_utc'] = Variable<DateTime>(updatedAtUtc.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(rowid.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('TasksCompanion(')
..write('id: $id, ')
..write('ownerId: $ownerId, ')
..write('title: $title, ')
..write('projectId: $projectId, ')
..write('parentId: $parentId, ')
..write('type: $type, ')
..write('status: $status, ')
..write('priority: $priority, ')
..write('reward: $reward, ')
..write('difficulty: $difficulty, ')
..write('durationMinutes: $durationMinutes, ')
..write('scheduledStartUtc: $scheduledStartUtc, ')
..write('scheduledEndUtc: $scheduledEndUtc, ')
..write('actualStartUtc: $actualStartUtc, ')
..write('actualEndUtc: $actualEndUtc, ')
..write('completedAtUtc: $completedAtUtc, ')
..write('backlogTagsJson: $backlogTagsJson, ')
..write('reminderOverride: $reminderOverride, ')
..write('statsJson: $statsJson, ')
..write('backlogEnteredAtUtc: $backlogEnteredAtUtc, ')
..write('backlogEnteredProvenance: $backlogEnteredProvenance, ')
..write('revision: $revision, ')
..write('createdAtUtc: $createdAtUtc, ')
..write('updatedAtUtc: $updatedAtUtc, ')
..write('rowid: $rowid')
..write(')'))
.toString();
}
}
class $TaskActivitiesTable extends TaskActivities
with TableInfo<$TaskActivitiesTable, TaskActivityRow> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$TaskActivitiesTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _idMeta = const VerificationMeta('id');
@override
late final GeneratedColumn<String> id = GeneratedColumn<String>(
'id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _ownerIdMeta =
const VerificationMeta('ownerId');
@override
late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(
'owner_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _taskIdMeta = const VerificationMeta('taskId');
@override
late final GeneratedColumn<String> taskId = GeneratedColumn<String>(
'task_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _projectIdMeta =
const VerificationMeta('projectId');
@override
late final GeneratedColumn<String> projectId = GeneratedColumn<String>(
'project_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _operationIdMeta =
const VerificationMeta('operationId');
@override
late final GeneratedColumn<String> operationId = GeneratedColumn<String>(
'operation_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _codeMeta = const VerificationMeta('code');
@override
late final GeneratedColumn<String> code = GeneratedColumn<String>(
'code', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _occurredAtUtcMeta =
const VerificationMeta('occurredAtUtc');
@override
late final GeneratedColumn<DateTime> occurredAtUtc =
GeneratedColumn<DateTime>('occurred_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
static const VerificationMeta _metadataJsonMeta =
const VerificationMeta('metadataJson');
@override
late final GeneratedColumn<String> metadataJson = GeneratedColumn<String>(
'metadata_json', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
@override
List<GeneratedColumn> get $columns => [
id,
ownerId,
taskId,
projectId,
operationId,
code,
occurredAtUtc,
metadataJson
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'task_activities';
@override
VerificationContext validateIntegrity(Insertable<TaskActivityRow> instance,
{bool isInserting = false}) {
final context = VerificationContext();
final data = instance.toColumns(true);
if (data.containsKey('id')) {
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
} else if (isInserting) {
context.missing(_idMeta);
}
if (data.containsKey('owner_id')) {
context.handle(_ownerIdMeta,
ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta));
} else if (isInserting) {
context.missing(_ownerIdMeta);
}
if (data.containsKey('task_id')) {
context.handle(_taskIdMeta,
taskId.isAcceptableOrUnknown(data['task_id']!, _taskIdMeta));
} else if (isInserting) {
context.missing(_taskIdMeta);
}
if (data.containsKey('project_id')) {
context.handle(_projectIdMeta,
projectId.isAcceptableOrUnknown(data['project_id']!, _projectIdMeta));
} else if (isInserting) {
context.missing(_projectIdMeta);
}
if (data.containsKey('operation_id')) {
context.handle(
_operationIdMeta,
operationId.isAcceptableOrUnknown(
data['operation_id']!, _operationIdMeta));
} else if (isInserting) {
context.missing(_operationIdMeta);
}
if (data.containsKey('code')) {
context.handle(
_codeMeta, code.isAcceptableOrUnknown(data['code']!, _codeMeta));
} else if (isInserting) {
context.missing(_codeMeta);
}
if (data.containsKey('occurred_at_utc')) {
context.handle(
_occurredAtUtcMeta,
occurredAtUtc.isAcceptableOrUnknown(
data['occurred_at_utc']!, _occurredAtUtcMeta));
} else if (isInserting) {
context.missing(_occurredAtUtcMeta);
}
if (data.containsKey('metadata_json')) {
context.handle(
_metadataJsonMeta,
metadataJson.isAcceptableOrUnknown(
data['metadata_json']!, _metadataJsonMeta));
} else if (isInserting) {
context.missing(_metadataJsonMeta);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {id};
@override
TaskActivityRow map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return TaskActivityRow(
id: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}id'])!,
ownerId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,
taskId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}task_id'])!,
projectId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}project_id'])!,
operationId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}operation_id'])!,
code: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}code'])!,
occurredAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}occurred_at_utc'])!,
metadataJson: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}metadata_json'])!,
);
}
@override
$TaskActivitiesTable createAlias(String alias) {
return $TaskActivitiesTable(attachedDatabase, alias);
}
}
class TaskActivityRow extends DataClass implements Insertable<TaskActivityRow> {
/// Returns the derived `id` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String id;
/// Returns the derived `ownerId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String ownerId;
/// Returns the derived `taskId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String taskId;
/// Returns the derived `projectId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String projectId;
/// Returns the derived `operationId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String operationId;
/// Returns the derived `code` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String code;
/// Returns the derived `occurredAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime occurredAtUtc;
/// Converts scheduler data for `metadataJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String metadataJson;
const TaskActivityRow(
{required this.id,
required this.ownerId,
required this.taskId,
required this.projectId,
required this.operationId,
required this.code,
required this.occurredAtUtc,
required this.metadataJson});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<String>(id);
map['owner_id'] = Variable<String>(ownerId);
map['task_id'] = Variable<String>(taskId);
map['project_id'] = Variable<String>(projectId);
map['operation_id'] = Variable<String>(operationId);
map['code'] = Variable<String>(code);
map['occurred_at_utc'] = Variable<DateTime>(occurredAtUtc);
map['metadata_json'] = Variable<String>(metadataJson);
return map;
}
TaskActivitiesCompanion toCompanion(bool nullToAbsent) {
return TaskActivitiesCompanion(
id: Value(id),
ownerId: Value(ownerId),
taskId: Value(taskId),
projectId: Value(projectId),
operationId: Value(operationId),
code: Value(code),
occurredAtUtc: Value(occurredAtUtc),
metadataJson: Value(metadataJson),
);
}
factory TaskActivityRow.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return TaskActivityRow(
id: serializer.fromJson<String>(json['id']),
ownerId: serializer.fromJson<String>(json['ownerId']),
taskId: serializer.fromJson<String>(json['taskId']),
projectId: serializer.fromJson<String>(json['projectId']),
operationId: serializer.fromJson<String>(json['operationId']),
code: serializer.fromJson<String>(json['code']),
occurredAtUtc: serializer.fromJson<DateTime>(json['occurredAtUtc']),
metadataJson: serializer.fromJson<String>(json['metadataJson']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'id': serializer.toJson<String>(id),
'ownerId': serializer.toJson<String>(ownerId),
'taskId': serializer.toJson<String>(taskId),
'projectId': serializer.toJson<String>(projectId),
'operationId': serializer.toJson<String>(operationId),
'code': serializer.toJson<String>(code),
'occurredAtUtc': serializer.toJson<DateTime>(occurredAtUtc),
'metadataJson': serializer.toJson<String>(metadataJson),
};
}
TaskActivityRow copyWith(
{String? id,
String? ownerId,
String? taskId,
String? projectId,
String? operationId,
String? code,
DateTime? occurredAtUtc,
String? metadataJson}) =>
TaskActivityRow(
id: id ?? this.id,
ownerId: ownerId ?? this.ownerId,
taskId: taskId ?? this.taskId,
projectId: projectId ?? this.projectId,
operationId: operationId ?? this.operationId,
code: code ?? this.code,
occurredAtUtc: occurredAtUtc ?? this.occurredAtUtc,
metadataJson: metadataJson ?? this.metadataJson,
);
TaskActivityRow copyWithCompanion(TaskActivitiesCompanion data) {
return TaskActivityRow(
id: data.id.present ? data.id.value : this.id,
ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,
taskId: data.taskId.present ? data.taskId.value : this.taskId,
projectId: data.projectId.present ? data.projectId.value : this.projectId,
operationId:
data.operationId.present ? data.operationId.value : this.operationId,
code: data.code.present ? data.code.value : this.code,
occurredAtUtc: data.occurredAtUtc.present
? data.occurredAtUtc.value
: this.occurredAtUtc,
metadataJson: data.metadataJson.present
? data.metadataJson.value
: this.metadataJson,
);
}
@override
String toString() {
return (StringBuffer('TaskActivityRow(')
..write('id: $id, ')
..write('ownerId: $ownerId, ')
..write('taskId: $taskId, ')
..write('projectId: $projectId, ')
..write('operationId: $operationId, ')
..write('code: $code, ')
..write('occurredAtUtc: $occurredAtUtc, ')
..write('metadataJson: $metadataJson')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(id, ownerId, taskId, projectId, operationId,
code, occurredAtUtc, metadataJson);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is TaskActivityRow &&
other.id == this.id &&
other.ownerId == this.ownerId &&
other.taskId == this.taskId &&
other.projectId == this.projectId &&
other.operationId == this.operationId &&
other.code == this.code &&
other.occurredAtUtc == this.occurredAtUtc &&
other.metadataJson == this.metadataJson);
}
class TaskActivitiesCompanion extends UpdateCompanion<TaskActivityRow> {
final Value<String> id;
final Value<String> ownerId;
final Value<String> taskId;
final Value<String> projectId;
final Value<String> operationId;
final Value<String> code;
final Value<DateTime> occurredAtUtc;
final Value<String> metadataJson;
final Value<int> rowid;
const TaskActivitiesCompanion({
this.id = const Value.absent(),
this.ownerId = const Value.absent(),
this.taskId = const Value.absent(),
this.projectId = const Value.absent(),
this.operationId = const Value.absent(),
this.code = const Value.absent(),
this.occurredAtUtc = const Value.absent(),
this.metadataJson = const Value.absent(),
this.rowid = const Value.absent(),
});
TaskActivitiesCompanion.insert({
required String id,
required String ownerId,
required String taskId,
required String projectId,
required String operationId,
required String code,
required DateTime occurredAtUtc,
required String metadataJson,
this.rowid = const Value.absent(),
}) : id = Value(id),
ownerId = Value(ownerId),
taskId = Value(taskId),
projectId = Value(projectId),
operationId = Value(operationId),
code = Value(code),
occurredAtUtc = Value(occurredAtUtc),
metadataJson = Value(metadataJson);
static Insertable<TaskActivityRow> custom({
Expression<String>? id,
Expression<String>? ownerId,
Expression<String>? taskId,
Expression<String>? projectId,
Expression<String>? operationId,
Expression<String>? code,
Expression<DateTime>? occurredAtUtc,
Expression<String>? metadataJson,
Expression<int>? rowid,
}) {
return RawValuesInsertable({
if (id != null) 'id': id,
if (ownerId != null) 'owner_id': ownerId,
if (taskId != null) 'task_id': taskId,
if (projectId != null) 'project_id': projectId,
if (operationId != null) 'operation_id': operationId,
if (code != null) 'code': code,
if (occurredAtUtc != null) 'occurred_at_utc': occurredAtUtc,
if (metadataJson != null) 'metadata_json': metadataJson,
if (rowid != null) 'rowid': rowid,
});
}
TaskActivitiesCompanion copyWith(
{Value<String>? id,
Value<String>? ownerId,
Value<String>? taskId,
Value<String>? projectId,
Value<String>? operationId,
Value<String>? code,
Value<DateTime>? occurredAtUtc,
Value<String>? metadataJson,
Value<int>? rowid}) {
return TaskActivitiesCompanion(
id: id ?? this.id,
ownerId: ownerId ?? this.ownerId,
taskId: taskId ?? this.taskId,
projectId: projectId ?? this.projectId,
operationId: operationId ?? this.operationId,
code: code ?? this.code,
occurredAtUtc: occurredAtUtc ?? this.occurredAtUtc,
metadataJson: metadataJson ?? this.metadataJson,
rowid: rowid ?? this.rowid,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (id.present) {
map['id'] = Variable<String>(id.value);
}
if (ownerId.present) {
map['owner_id'] = Variable<String>(ownerId.value);
}
if (taskId.present) {
map['task_id'] = Variable<String>(taskId.value);
}
if (projectId.present) {
map['project_id'] = Variable<String>(projectId.value);
}
if (operationId.present) {
map['operation_id'] = Variable<String>(operationId.value);
}
if (code.present) {
map['code'] = Variable<String>(code.value);
}
if (occurredAtUtc.present) {
map['occurred_at_utc'] = Variable<DateTime>(occurredAtUtc.value);
}
if (metadataJson.present) {
map['metadata_json'] = Variable<String>(metadataJson.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(rowid.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('TaskActivitiesCompanion(')
..write('id: $id, ')
..write('ownerId: $ownerId, ')
..write('taskId: $taskId, ')
..write('projectId: $projectId, ')
..write('operationId: $operationId, ')
..write('code: $code, ')
..write('occurredAtUtc: $occurredAtUtc, ')
..write('metadataJson: $metadataJson, ')
..write('rowid: $rowid')
..write(')'))
.toString();
}
}
class $ProjectsTable extends Projects
with TableInfo<$ProjectsTable, ProjectRow> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$ProjectsTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _idMeta = const VerificationMeta('id');
@override
late final GeneratedColumn<String> id = GeneratedColumn<String>(
'id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _ownerIdMeta =
const VerificationMeta('ownerId');
@override
late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(
'owner_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _nameMeta = const VerificationMeta('name');
@override
late final GeneratedColumn<String> name = GeneratedColumn<String>(
'name', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _colorKeyMeta =
const VerificationMeta('colorKey');
@override
late final GeneratedColumn<String> colorKey = GeneratedColumn<String>(
'color_key', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _defaultPriorityMeta =
const VerificationMeta('defaultPriority');
@override
late final GeneratedColumn<String> defaultPriority = GeneratedColumn<String>(
'default_priority', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _defaultRewardMeta =
const VerificationMeta('defaultReward');
@override
late final GeneratedColumn<String> defaultReward = GeneratedColumn<String>(
'default_reward', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _defaultDifficultyMeta =
const VerificationMeta('defaultDifficulty');
@override
late final GeneratedColumn<String> defaultDifficulty =
GeneratedColumn<String>('default_difficulty', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _defaultReminderProfileMeta =
const VerificationMeta('defaultReminderProfile');
@override
late final GeneratedColumn<String> defaultReminderProfile =
GeneratedColumn<String>('default_reminder_profile', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _defaultDurationMinutesMeta =
const VerificationMeta('defaultDurationMinutes');
@override
late final GeneratedColumn<int> defaultDurationMinutes = GeneratedColumn<int>(
'default_duration_minutes', aliasedName, true,
type: DriftSqlType.int, requiredDuringInsert: false);
static const VerificationMeta _archivedAtUtcMeta =
const VerificationMeta('archivedAtUtc');
@override
late final GeneratedColumn<DateTime> archivedAtUtc =
GeneratedColumn<DateTime>('archived_at_utc', aliasedName, true,
type: DriftSqlType.dateTime, requiredDuringInsert: false);
static const VerificationMeta _revisionMeta =
const VerificationMeta('revision');
@override
late final GeneratedColumn<int> revision = GeneratedColumn<int>(
'revision', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _createdAtUtcMeta =
const VerificationMeta('createdAtUtc');
@override
late final GeneratedColumn<DateTime> createdAtUtc = GeneratedColumn<DateTime>(
'created_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
static const VerificationMeta _updatedAtUtcMeta =
const VerificationMeta('updatedAtUtc');
@override
late final GeneratedColumn<DateTime> updatedAtUtc = GeneratedColumn<DateTime>(
'updated_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
@override
List<GeneratedColumn> get $columns => [
id,
ownerId,
name,
colorKey,
defaultPriority,
defaultReward,
defaultDifficulty,
defaultReminderProfile,
defaultDurationMinutes,
archivedAtUtc,
revision,
createdAtUtc,
updatedAtUtc
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'projects';
@override
VerificationContext validateIntegrity(Insertable<ProjectRow> instance,
{bool isInserting = false}) {
final context = VerificationContext();
final data = instance.toColumns(true);
if (data.containsKey('id')) {
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
} else if (isInserting) {
context.missing(_idMeta);
}
if (data.containsKey('owner_id')) {
context.handle(_ownerIdMeta,
ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta));
} else if (isInserting) {
context.missing(_ownerIdMeta);
}
if (data.containsKey('name')) {
context.handle(
_nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta));
} else if (isInserting) {
context.missing(_nameMeta);
}
if (data.containsKey('color_key')) {
context.handle(_colorKeyMeta,
colorKey.isAcceptableOrUnknown(data['color_key']!, _colorKeyMeta));
} else if (isInserting) {
context.missing(_colorKeyMeta);
}
if (data.containsKey('default_priority')) {
context.handle(
_defaultPriorityMeta,
defaultPriority.isAcceptableOrUnknown(
data['default_priority']!, _defaultPriorityMeta));
} else if (isInserting) {
context.missing(_defaultPriorityMeta);
}
if (data.containsKey('default_reward')) {
context.handle(
_defaultRewardMeta,
defaultReward.isAcceptableOrUnknown(
data['default_reward']!, _defaultRewardMeta));
} else if (isInserting) {
context.missing(_defaultRewardMeta);
}
if (data.containsKey('default_difficulty')) {
context.handle(
_defaultDifficultyMeta,
defaultDifficulty.isAcceptableOrUnknown(
data['default_difficulty']!, _defaultDifficultyMeta));
} else if (isInserting) {
context.missing(_defaultDifficultyMeta);
}
if (data.containsKey('default_reminder_profile')) {
context.handle(
_defaultReminderProfileMeta,
defaultReminderProfile.isAcceptableOrUnknown(
data['default_reminder_profile']!, _defaultReminderProfileMeta));
} else if (isInserting) {
context.missing(_defaultReminderProfileMeta);
}
if (data.containsKey('default_duration_minutes')) {
context.handle(
_defaultDurationMinutesMeta,
defaultDurationMinutes.isAcceptableOrUnknown(
data['default_duration_minutes']!, _defaultDurationMinutesMeta));
}
if (data.containsKey('archived_at_utc')) {
context.handle(
_archivedAtUtcMeta,
archivedAtUtc.isAcceptableOrUnknown(
data['archived_at_utc']!, _archivedAtUtcMeta));
}
if (data.containsKey('revision')) {
context.handle(_revisionMeta,
revision.isAcceptableOrUnknown(data['revision']!, _revisionMeta));
} else if (isInserting) {
context.missing(_revisionMeta);
}
if (data.containsKey('created_at_utc')) {
context.handle(
_createdAtUtcMeta,
createdAtUtc.isAcceptableOrUnknown(
data['created_at_utc']!, _createdAtUtcMeta));
} else if (isInserting) {
context.missing(_createdAtUtcMeta);
}
if (data.containsKey('updated_at_utc')) {
context.handle(
_updatedAtUtcMeta,
updatedAtUtc.isAcceptableOrUnknown(
data['updated_at_utc']!, _updatedAtUtcMeta));
} else if (isInserting) {
context.missing(_updatedAtUtcMeta);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {id};
@override
ProjectRow map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return ProjectRow(
id: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}id'])!,
ownerId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,
name: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}name'])!,
colorKey: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}color_key'])!,
defaultPriority: attachedDatabase.typeMapping.read(
DriftSqlType.string, data['${effectivePrefix}default_priority'])!,
defaultReward: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}default_reward'])!,
defaultDifficulty: attachedDatabase.typeMapping.read(
DriftSqlType.string, data['${effectivePrefix}default_difficulty'])!,
defaultReminderProfile: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}default_reminder_profile'])!,
defaultDurationMinutes: attachedDatabase.typeMapping.read(
DriftSqlType.int, data['${effectivePrefix}default_duration_minutes']),
archivedAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}archived_at_utc']),
revision: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}revision'])!,
createdAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}created_at_utc'])!,
updatedAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}updated_at_utc'])!,
);
}
@override
$ProjectsTable createAlias(String alias) {
return $ProjectsTable(attachedDatabase, alias);
}
}
class ProjectRow extends DataClass implements Insertable<ProjectRow> {
/// Returns the derived `id` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String id;
/// Returns the derived `ownerId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String ownerId;
/// Returns the derived `name` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String name;
/// Returns the derived `colorKey` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String colorKey;
/// Returns the derived `defaultPriority` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String defaultPriority;
/// Returns the derived `defaultReward` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String defaultReward;
/// Returns the derived `defaultDifficulty` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String defaultDifficulty;
/// Returns the derived `defaultReminderProfile` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String defaultReminderProfile;
/// Returns the derived `defaultDurationMinutes` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final int? defaultDurationMinutes;
/// Returns the derived `archivedAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime? archivedAtUtc;
/// Returns the derived `revision` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final int revision;
/// Returns the derived `createdAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime createdAtUtc;
/// Returns the derived `updatedAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime updatedAtUtc;
const ProjectRow(
{required this.id,
required this.ownerId,
required this.name,
required this.colorKey,
required this.defaultPriority,
required this.defaultReward,
required this.defaultDifficulty,
required this.defaultReminderProfile,
this.defaultDurationMinutes,
this.archivedAtUtc,
required this.revision,
required this.createdAtUtc,
required this.updatedAtUtc});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<String>(id);
map['owner_id'] = Variable<String>(ownerId);
map['name'] = Variable<String>(name);
map['color_key'] = Variable<String>(colorKey);
map['default_priority'] = Variable<String>(defaultPriority);
map['default_reward'] = Variable<String>(defaultReward);
map['default_difficulty'] = Variable<String>(defaultDifficulty);
map['default_reminder_profile'] = Variable<String>(defaultReminderProfile);
if (!nullToAbsent || defaultDurationMinutes != null) {
map['default_duration_minutes'] = Variable<int>(defaultDurationMinutes);
}
if (!nullToAbsent || archivedAtUtc != null) {
map['archived_at_utc'] = Variable<DateTime>(archivedAtUtc);
}
map['revision'] = Variable<int>(revision);
map['created_at_utc'] = Variable<DateTime>(createdAtUtc);
map['updated_at_utc'] = Variable<DateTime>(updatedAtUtc);
return map;
}
ProjectsCompanion toCompanion(bool nullToAbsent) {
return ProjectsCompanion(
id: Value(id),
ownerId: Value(ownerId),
name: Value(name),
colorKey: Value(colorKey),
defaultPriority: Value(defaultPriority),
defaultReward: Value(defaultReward),
defaultDifficulty: Value(defaultDifficulty),
defaultReminderProfile: Value(defaultReminderProfile),
defaultDurationMinutes: defaultDurationMinutes == null && nullToAbsent
? const Value.absent()
: Value(defaultDurationMinutes),
archivedAtUtc: archivedAtUtc == null && nullToAbsent
? const Value.absent()
: Value(archivedAtUtc),
revision: Value(revision),
createdAtUtc: Value(createdAtUtc),
updatedAtUtc: Value(updatedAtUtc),
);
}
factory ProjectRow.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return ProjectRow(
id: serializer.fromJson<String>(json['id']),
ownerId: serializer.fromJson<String>(json['ownerId']),
name: serializer.fromJson<String>(json['name']),
colorKey: serializer.fromJson<String>(json['colorKey']),
defaultPriority: serializer.fromJson<String>(json['defaultPriority']),
defaultReward: serializer.fromJson<String>(json['defaultReward']),
defaultDifficulty: serializer.fromJson<String>(json['defaultDifficulty']),
defaultReminderProfile:
serializer.fromJson<String>(json['defaultReminderProfile']),
defaultDurationMinutes:
serializer.fromJson<int?>(json['defaultDurationMinutes']),
archivedAtUtc: serializer.fromJson<DateTime?>(json['archivedAtUtc']),
revision: serializer.fromJson<int>(json['revision']),
createdAtUtc: serializer.fromJson<DateTime>(json['createdAtUtc']),
updatedAtUtc: serializer.fromJson<DateTime>(json['updatedAtUtc']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'id': serializer.toJson<String>(id),
'ownerId': serializer.toJson<String>(ownerId),
'name': serializer.toJson<String>(name),
'colorKey': serializer.toJson<String>(colorKey),
'defaultPriority': serializer.toJson<String>(defaultPriority),
'defaultReward': serializer.toJson<String>(defaultReward),
'defaultDifficulty': serializer.toJson<String>(defaultDifficulty),
'defaultReminderProfile':
serializer.toJson<String>(defaultReminderProfile),
'defaultDurationMinutes': serializer.toJson<int?>(defaultDurationMinutes),
'archivedAtUtc': serializer.toJson<DateTime?>(archivedAtUtc),
'revision': serializer.toJson<int>(revision),
'createdAtUtc': serializer.toJson<DateTime>(createdAtUtc),
'updatedAtUtc': serializer.toJson<DateTime>(updatedAtUtc),
};
}
ProjectRow copyWith(
{String? id,
String? ownerId,
String? name,
String? colorKey,
String? defaultPriority,
String? defaultReward,
String? defaultDifficulty,
String? defaultReminderProfile,
Value<int?> defaultDurationMinutes = const Value.absent(),
Value<DateTime?> archivedAtUtc = const Value.absent(),
int? revision,
DateTime? createdAtUtc,
DateTime? updatedAtUtc}) =>
ProjectRow(
id: id ?? this.id,
ownerId: ownerId ?? this.ownerId,
name: name ?? this.name,
colorKey: colorKey ?? this.colorKey,
defaultPriority: defaultPriority ?? this.defaultPriority,
defaultReward: defaultReward ?? this.defaultReward,
defaultDifficulty: defaultDifficulty ?? this.defaultDifficulty,
defaultReminderProfile:
defaultReminderProfile ?? this.defaultReminderProfile,
defaultDurationMinutes: defaultDurationMinutes.present
? defaultDurationMinutes.value
: this.defaultDurationMinutes,
archivedAtUtc:
archivedAtUtc.present ? archivedAtUtc.value : this.archivedAtUtc,
revision: revision ?? this.revision,
createdAtUtc: createdAtUtc ?? this.createdAtUtc,
updatedAtUtc: updatedAtUtc ?? this.updatedAtUtc,
);
ProjectRow copyWithCompanion(ProjectsCompanion data) {
return ProjectRow(
id: data.id.present ? data.id.value : this.id,
ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,
name: data.name.present ? data.name.value : this.name,
colorKey: data.colorKey.present ? data.colorKey.value : this.colorKey,
defaultPriority: data.defaultPriority.present
? data.defaultPriority.value
: this.defaultPriority,
defaultReward: data.defaultReward.present
? data.defaultReward.value
: this.defaultReward,
defaultDifficulty: data.defaultDifficulty.present
? data.defaultDifficulty.value
: this.defaultDifficulty,
defaultReminderProfile: data.defaultReminderProfile.present
? data.defaultReminderProfile.value
: this.defaultReminderProfile,
defaultDurationMinutes: data.defaultDurationMinutes.present
? data.defaultDurationMinutes.value
: this.defaultDurationMinutes,
archivedAtUtc: data.archivedAtUtc.present
? data.archivedAtUtc.value
: this.archivedAtUtc,
revision: data.revision.present ? data.revision.value : this.revision,
createdAtUtc: data.createdAtUtc.present
? data.createdAtUtc.value
: this.createdAtUtc,
updatedAtUtc: data.updatedAtUtc.present
? data.updatedAtUtc.value
: this.updatedAtUtc,
);
}
@override
String toString() {
return (StringBuffer('ProjectRow(')
..write('id: $id, ')
..write('ownerId: $ownerId, ')
..write('name: $name, ')
..write('colorKey: $colorKey, ')
..write('defaultPriority: $defaultPriority, ')
..write('defaultReward: $defaultReward, ')
..write('defaultDifficulty: $defaultDifficulty, ')
..write('defaultReminderProfile: $defaultReminderProfile, ')
..write('defaultDurationMinutes: $defaultDurationMinutes, ')
..write('archivedAtUtc: $archivedAtUtc, ')
..write('revision: $revision, ')
..write('createdAtUtc: $createdAtUtc, ')
..write('updatedAtUtc: $updatedAtUtc')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(
id,
ownerId,
name,
colorKey,
defaultPriority,
defaultReward,
defaultDifficulty,
defaultReminderProfile,
defaultDurationMinutes,
archivedAtUtc,
revision,
createdAtUtc,
updatedAtUtc);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is ProjectRow &&
other.id == this.id &&
other.ownerId == this.ownerId &&
other.name == this.name &&
other.colorKey == this.colorKey &&
other.defaultPriority == this.defaultPriority &&
other.defaultReward == this.defaultReward &&
other.defaultDifficulty == this.defaultDifficulty &&
other.defaultReminderProfile == this.defaultReminderProfile &&
other.defaultDurationMinutes == this.defaultDurationMinutes &&
other.archivedAtUtc == this.archivedAtUtc &&
other.revision == this.revision &&
other.createdAtUtc == this.createdAtUtc &&
other.updatedAtUtc == this.updatedAtUtc);
}
class ProjectsCompanion extends UpdateCompanion<ProjectRow> {
final Value<String> id;
final Value<String> ownerId;
final Value<String> name;
final Value<String> colorKey;
final Value<String> defaultPriority;
final Value<String> defaultReward;
final Value<String> defaultDifficulty;
final Value<String> defaultReminderProfile;
final Value<int?> defaultDurationMinutes;
final Value<DateTime?> archivedAtUtc;
final Value<int> revision;
final Value<DateTime> createdAtUtc;
final Value<DateTime> updatedAtUtc;
final Value<int> rowid;
const ProjectsCompanion({
this.id = const Value.absent(),
this.ownerId = const Value.absent(),
this.name = const Value.absent(),
this.colorKey = const Value.absent(),
this.defaultPriority = const Value.absent(),
this.defaultReward = const Value.absent(),
this.defaultDifficulty = const Value.absent(),
this.defaultReminderProfile = const Value.absent(),
this.defaultDurationMinutes = const Value.absent(),
this.archivedAtUtc = const Value.absent(),
this.revision = const Value.absent(),
this.createdAtUtc = const Value.absent(),
this.updatedAtUtc = const Value.absent(),
this.rowid = const Value.absent(),
});
ProjectsCompanion.insert({
required String id,
required String ownerId,
required String name,
required String colorKey,
required String defaultPriority,
required String defaultReward,
required String defaultDifficulty,
required String defaultReminderProfile,
this.defaultDurationMinutes = const Value.absent(),
this.archivedAtUtc = const Value.absent(),
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
this.rowid = const Value.absent(),
}) : id = Value(id),
ownerId = Value(ownerId),
name = Value(name),
colorKey = Value(colorKey),
defaultPriority = Value(defaultPriority),
defaultReward = Value(defaultReward),
defaultDifficulty = Value(defaultDifficulty),
defaultReminderProfile = Value(defaultReminderProfile),
revision = Value(revision),
createdAtUtc = Value(createdAtUtc),
updatedAtUtc = Value(updatedAtUtc);
static Insertable<ProjectRow> custom({
Expression<String>? id,
Expression<String>? ownerId,
Expression<String>? name,
Expression<String>? colorKey,
Expression<String>? defaultPriority,
Expression<String>? defaultReward,
Expression<String>? defaultDifficulty,
Expression<String>? defaultReminderProfile,
Expression<int>? defaultDurationMinutes,
Expression<DateTime>? archivedAtUtc,
Expression<int>? revision,
Expression<DateTime>? createdAtUtc,
Expression<DateTime>? updatedAtUtc,
Expression<int>? rowid,
}) {
return RawValuesInsertable({
if (id != null) 'id': id,
if (ownerId != null) 'owner_id': ownerId,
if (name != null) 'name': name,
if (colorKey != null) 'color_key': colorKey,
if (defaultPriority != null) 'default_priority': defaultPriority,
if (defaultReward != null) 'default_reward': defaultReward,
if (defaultDifficulty != null) 'default_difficulty': defaultDifficulty,
if (defaultReminderProfile != null)
'default_reminder_profile': defaultReminderProfile,
if (defaultDurationMinutes != null)
'default_duration_minutes': defaultDurationMinutes,
if (archivedAtUtc != null) 'archived_at_utc': archivedAtUtc,
if (revision != null) 'revision': revision,
if (createdAtUtc != null) 'created_at_utc': createdAtUtc,
if (updatedAtUtc != null) 'updated_at_utc': updatedAtUtc,
if (rowid != null) 'rowid': rowid,
});
}
ProjectsCompanion copyWith(
{Value<String>? id,
Value<String>? ownerId,
Value<String>? name,
Value<String>? colorKey,
Value<String>? defaultPriority,
Value<String>? defaultReward,
Value<String>? defaultDifficulty,
Value<String>? defaultReminderProfile,
Value<int?>? defaultDurationMinutes,
Value<DateTime?>? archivedAtUtc,
Value<int>? revision,
Value<DateTime>? createdAtUtc,
Value<DateTime>? updatedAtUtc,
Value<int>? rowid}) {
return ProjectsCompanion(
id: id ?? this.id,
ownerId: ownerId ?? this.ownerId,
name: name ?? this.name,
colorKey: colorKey ?? this.colorKey,
defaultPriority: defaultPriority ?? this.defaultPriority,
defaultReward: defaultReward ?? this.defaultReward,
defaultDifficulty: defaultDifficulty ?? this.defaultDifficulty,
defaultReminderProfile:
defaultReminderProfile ?? this.defaultReminderProfile,
defaultDurationMinutes:
defaultDurationMinutes ?? this.defaultDurationMinutes,
archivedAtUtc: archivedAtUtc ?? this.archivedAtUtc,
revision: revision ?? this.revision,
createdAtUtc: createdAtUtc ?? this.createdAtUtc,
updatedAtUtc: updatedAtUtc ?? this.updatedAtUtc,
rowid: rowid ?? this.rowid,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (id.present) {
map['id'] = Variable<String>(id.value);
}
if (ownerId.present) {
map['owner_id'] = Variable<String>(ownerId.value);
}
if (name.present) {
map['name'] = Variable<String>(name.value);
}
if (colorKey.present) {
map['color_key'] = Variable<String>(colorKey.value);
}
if (defaultPriority.present) {
map['default_priority'] = Variable<String>(defaultPriority.value);
}
if (defaultReward.present) {
map['default_reward'] = Variable<String>(defaultReward.value);
}
if (defaultDifficulty.present) {
map['default_difficulty'] = Variable<String>(defaultDifficulty.value);
}
if (defaultReminderProfile.present) {
map['default_reminder_profile'] =
Variable<String>(defaultReminderProfile.value);
}
if (defaultDurationMinutes.present) {
map['default_duration_minutes'] =
Variable<int>(defaultDurationMinutes.value);
}
if (archivedAtUtc.present) {
map['archived_at_utc'] = Variable<DateTime>(archivedAtUtc.value);
}
if (revision.present) {
map['revision'] = Variable<int>(revision.value);
}
if (createdAtUtc.present) {
map['created_at_utc'] = Variable<DateTime>(createdAtUtc.value);
}
if (updatedAtUtc.present) {
map['updated_at_utc'] = Variable<DateTime>(updatedAtUtc.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(rowid.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('ProjectsCompanion(')
..write('id: $id, ')
..write('ownerId: $ownerId, ')
..write('name: $name, ')
..write('colorKey: $colorKey, ')
..write('defaultPriority: $defaultPriority, ')
..write('defaultReward: $defaultReward, ')
..write('defaultDifficulty: $defaultDifficulty, ')
..write('defaultReminderProfile: $defaultReminderProfile, ')
..write('defaultDurationMinutes: $defaultDurationMinutes, ')
..write('archivedAtUtc: $archivedAtUtc, ')
..write('revision: $revision, ')
..write('createdAtUtc: $createdAtUtc, ')
..write('updatedAtUtc: $updatedAtUtc, ')
..write('rowid: $rowid')
..write(')'))
.toString();
}
}
class $ProjectStatisticsTableTable extends ProjectStatisticsTable
with TableInfo<$ProjectStatisticsTableTable, ProjectStatisticsRow> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$ProjectStatisticsTableTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _projectIdMeta =
const VerificationMeta('projectId');
@override
late final GeneratedColumn<String> projectId = GeneratedColumn<String>(
'project_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _ownerIdMeta =
const VerificationMeta('ownerId');
@override
late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(
'owner_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _completedTaskCountMeta =
const VerificationMeta('completedTaskCount');
@override
late final GeneratedColumn<int> completedTaskCount = GeneratedColumn<int>(
'completed_task_count', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _durationMinuteCountsJsonMeta =
const VerificationMeta('durationMinuteCountsJson');
@override
late final GeneratedColumn<String> durationMinuteCountsJson =
GeneratedColumn<String>('duration_minute_counts_json', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _completionTimeBucketCountsJsonMeta =
const VerificationMeta('completionTimeBucketCountsJson');
@override
late final GeneratedColumn<String> completionTimeBucketCountsJson =
GeneratedColumn<String>(
'completion_time_bucket_counts_json', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _totalPushesBeforeCompletionMeta =
const VerificationMeta('totalPushesBeforeCompletion');
@override
late final GeneratedColumn<int> totalPushesBeforeCompletion =
GeneratedColumn<int>('total_pushes_before_completion', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _completedAfterPushCountMeta =
const VerificationMeta('completedAfterPushCount');
@override
late final GeneratedColumn<int> completedAfterPushCount =
GeneratedColumn<int>('completed_after_push_count', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _rewardCountsJsonMeta =
const VerificationMeta('rewardCountsJson');
@override
late final GeneratedColumn<String> rewardCountsJson = GeneratedColumn<String>(
'reward_counts_json', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _difficultyCountsJsonMeta =
const VerificationMeta('difficultyCountsJson');
@override
late final GeneratedColumn<String> difficultyCountsJson =
GeneratedColumn<String>('difficulty_counts_json', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _reminderProfileCountsJsonMeta =
const VerificationMeta('reminderProfileCountsJson');
@override
late final GeneratedColumn<String> reminderProfileCountsJson =
GeneratedColumn<String>(
'reminder_profile_counts_json', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _revisionMeta =
const VerificationMeta('revision');
@override
late final GeneratedColumn<int> revision = GeneratedColumn<int>(
'revision', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _createdAtUtcMeta =
const VerificationMeta('createdAtUtc');
@override
late final GeneratedColumn<DateTime> createdAtUtc = GeneratedColumn<DateTime>(
'created_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
static const VerificationMeta _updatedAtUtcMeta =
const VerificationMeta('updatedAtUtc');
@override
late final GeneratedColumn<DateTime> updatedAtUtc = GeneratedColumn<DateTime>(
'updated_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
@override
List<GeneratedColumn> get $columns => [
projectId,
ownerId,
completedTaskCount,
durationMinuteCountsJson,
completionTimeBucketCountsJson,
totalPushesBeforeCompletion,
completedAfterPushCount,
rewardCountsJson,
difficultyCountsJson,
reminderProfileCountsJson,
revision,
createdAtUtc,
updatedAtUtc
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'project_statistics';
@override
VerificationContext validateIntegrity(
Insertable<ProjectStatisticsRow> instance,
{bool isInserting = false}) {
final context = VerificationContext();
final data = instance.toColumns(true);
if (data.containsKey('project_id')) {
context.handle(_projectIdMeta,
projectId.isAcceptableOrUnknown(data['project_id']!, _projectIdMeta));
} else if (isInserting) {
context.missing(_projectIdMeta);
}
if (data.containsKey('owner_id')) {
context.handle(_ownerIdMeta,
ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta));
} else if (isInserting) {
context.missing(_ownerIdMeta);
}
if (data.containsKey('completed_task_count')) {
context.handle(
_completedTaskCountMeta,
completedTaskCount.isAcceptableOrUnknown(
data['completed_task_count']!, _completedTaskCountMeta));
} else if (isInserting) {
context.missing(_completedTaskCountMeta);
}
if (data.containsKey('duration_minute_counts_json')) {
context.handle(
_durationMinuteCountsJsonMeta,
durationMinuteCountsJson.isAcceptableOrUnknown(
data['duration_minute_counts_json']!,
_durationMinuteCountsJsonMeta));
} else if (isInserting) {
context.missing(_durationMinuteCountsJsonMeta);
}
if (data.containsKey('completion_time_bucket_counts_json')) {
context.handle(
_completionTimeBucketCountsJsonMeta,
completionTimeBucketCountsJson.isAcceptableOrUnknown(
data['completion_time_bucket_counts_json']!,
_completionTimeBucketCountsJsonMeta));
} else if (isInserting) {
context.missing(_completionTimeBucketCountsJsonMeta);
}
if (data.containsKey('total_pushes_before_completion')) {
context.handle(
_totalPushesBeforeCompletionMeta,
totalPushesBeforeCompletion.isAcceptableOrUnknown(
data['total_pushes_before_completion']!,
_totalPushesBeforeCompletionMeta));
} else if (isInserting) {
context.missing(_totalPushesBeforeCompletionMeta);
}
if (data.containsKey('completed_after_push_count')) {
context.handle(
_completedAfterPushCountMeta,
completedAfterPushCount.isAcceptableOrUnknown(
data['completed_after_push_count']!,
_completedAfterPushCountMeta));
} else if (isInserting) {
context.missing(_completedAfterPushCountMeta);
}
if (data.containsKey('reward_counts_json')) {
context.handle(
_rewardCountsJsonMeta,
rewardCountsJson.isAcceptableOrUnknown(
data['reward_counts_json']!, _rewardCountsJsonMeta));
} else if (isInserting) {
context.missing(_rewardCountsJsonMeta);
}
if (data.containsKey('difficulty_counts_json')) {
context.handle(
_difficultyCountsJsonMeta,
difficultyCountsJson.isAcceptableOrUnknown(
data['difficulty_counts_json']!, _difficultyCountsJsonMeta));
} else if (isInserting) {
context.missing(_difficultyCountsJsonMeta);
}
if (data.containsKey('reminder_profile_counts_json')) {
context.handle(
_reminderProfileCountsJsonMeta,
reminderProfileCountsJson.isAcceptableOrUnknown(
data['reminder_profile_counts_json']!,
_reminderProfileCountsJsonMeta));
} else if (isInserting) {
context.missing(_reminderProfileCountsJsonMeta);
}
if (data.containsKey('revision')) {
context.handle(_revisionMeta,
revision.isAcceptableOrUnknown(data['revision']!, _revisionMeta));
} else if (isInserting) {
context.missing(_revisionMeta);
}
if (data.containsKey('created_at_utc')) {
context.handle(
_createdAtUtcMeta,
createdAtUtc.isAcceptableOrUnknown(
data['created_at_utc']!, _createdAtUtcMeta));
} else if (isInserting) {
context.missing(_createdAtUtcMeta);
}
if (data.containsKey('updated_at_utc')) {
context.handle(
_updatedAtUtcMeta,
updatedAtUtc.isAcceptableOrUnknown(
data['updated_at_utc']!, _updatedAtUtcMeta));
} else if (isInserting) {
context.missing(_updatedAtUtcMeta);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {projectId};
@override
ProjectStatisticsRow map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return ProjectStatisticsRow(
projectId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}project_id'])!,
ownerId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,
completedTaskCount: attachedDatabase.typeMapping.read(
DriftSqlType.int, data['${effectivePrefix}completed_task_count'])!,
durationMinuteCountsJson: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}duration_minute_counts_json'])!,
completionTimeBucketCountsJson: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}completion_time_bucket_counts_json'])!,
totalPushesBeforeCompletion: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}total_pushes_before_completion'])!,
completedAfterPushCount: attachedDatabase.typeMapping.read(
DriftSqlType.int,
data['${effectivePrefix}completed_after_push_count'])!,
rewardCountsJson: attachedDatabase.typeMapping.read(
DriftSqlType.string, data['${effectivePrefix}reward_counts_json'])!,
difficultyCountsJson: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}difficulty_counts_json'])!,
reminderProfileCountsJson: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}reminder_profile_counts_json'])!,
revision: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}revision'])!,
createdAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}created_at_utc'])!,
updatedAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}updated_at_utc'])!,
);
}
@override
$ProjectStatisticsTableTable createAlias(String alias) {
return $ProjectStatisticsTableTable(attachedDatabase, alias);
}
}
class ProjectStatisticsRow extends DataClass
implements Insertable<ProjectStatisticsRow> {
/// Returns the derived `projectId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String projectId;
/// Returns the derived `ownerId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String ownerId;
/// Returns the derived `completedTaskCount` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final int completedTaskCount;
/// Converts scheduler data for `durationMinuteCountsJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String durationMinuteCountsJson;
/// Converts scheduler data for `completionTimeBucketCountsJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String completionTimeBucketCountsJson;
/// Returns the derived `totalPushesBeforeCompletion` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final int totalPushesBeforeCompletion;
/// Returns the derived `completedAfterPushCount` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final int completedAfterPushCount;
/// Converts scheduler data for `rewardCountsJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String rewardCountsJson;
/// Converts scheduler data for `difficultyCountsJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String difficultyCountsJson;
/// Converts scheduler data for `reminderProfileCountsJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String reminderProfileCountsJson;
/// Returns the derived `revision` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final int revision;
/// Returns the derived `createdAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime createdAtUtc;
/// Returns the derived `updatedAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime updatedAtUtc;
const ProjectStatisticsRow(
{required this.projectId,
required this.ownerId,
required this.completedTaskCount,
required this.durationMinuteCountsJson,
required this.completionTimeBucketCountsJson,
required this.totalPushesBeforeCompletion,
required this.completedAfterPushCount,
required this.rewardCountsJson,
required this.difficultyCountsJson,
required this.reminderProfileCountsJson,
required this.revision,
required this.createdAtUtc,
required this.updatedAtUtc});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['project_id'] = Variable<String>(projectId);
map['owner_id'] = Variable<String>(ownerId);
map['completed_task_count'] = Variable<int>(completedTaskCount);
map['duration_minute_counts_json'] =
Variable<String>(durationMinuteCountsJson);
map['completion_time_bucket_counts_json'] =
Variable<String>(completionTimeBucketCountsJson);
map['total_pushes_before_completion'] =
Variable<int>(totalPushesBeforeCompletion);
map['completed_after_push_count'] = Variable<int>(completedAfterPushCount);
map['reward_counts_json'] = Variable<String>(rewardCountsJson);
map['difficulty_counts_json'] = Variable<String>(difficultyCountsJson);
map['reminder_profile_counts_json'] =
Variable<String>(reminderProfileCountsJson);
map['revision'] = Variable<int>(revision);
map['created_at_utc'] = Variable<DateTime>(createdAtUtc);
map['updated_at_utc'] = Variable<DateTime>(updatedAtUtc);
return map;
}
ProjectStatisticsTableCompanion toCompanion(bool nullToAbsent) {
return ProjectStatisticsTableCompanion(
projectId: Value(projectId),
ownerId: Value(ownerId),
completedTaskCount: Value(completedTaskCount),
durationMinuteCountsJson: Value(durationMinuteCountsJson),
completionTimeBucketCountsJson: Value(completionTimeBucketCountsJson),
totalPushesBeforeCompletion: Value(totalPushesBeforeCompletion),
completedAfterPushCount: Value(completedAfterPushCount),
rewardCountsJson: Value(rewardCountsJson),
difficultyCountsJson: Value(difficultyCountsJson),
reminderProfileCountsJson: Value(reminderProfileCountsJson),
revision: Value(revision),
createdAtUtc: Value(createdAtUtc),
updatedAtUtc: Value(updatedAtUtc),
);
}
factory ProjectStatisticsRow.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return ProjectStatisticsRow(
projectId: serializer.fromJson<String>(json['projectId']),
ownerId: serializer.fromJson<String>(json['ownerId']),
completedTaskCount: serializer.fromJson<int>(json['completedTaskCount']),
durationMinuteCountsJson:
serializer.fromJson<String>(json['durationMinuteCountsJson']),
completionTimeBucketCountsJson:
serializer.fromJson<String>(json['completionTimeBucketCountsJson']),
totalPushesBeforeCompletion:
serializer.fromJson<int>(json['totalPushesBeforeCompletion']),
completedAfterPushCount:
serializer.fromJson<int>(json['completedAfterPushCount']),
rewardCountsJson: serializer.fromJson<String>(json['rewardCountsJson']),
difficultyCountsJson:
serializer.fromJson<String>(json['difficultyCountsJson']),
reminderProfileCountsJson:
serializer.fromJson<String>(json['reminderProfileCountsJson']),
revision: serializer.fromJson<int>(json['revision']),
createdAtUtc: serializer.fromJson<DateTime>(json['createdAtUtc']),
updatedAtUtc: serializer.fromJson<DateTime>(json['updatedAtUtc']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'projectId': serializer.toJson<String>(projectId),
'ownerId': serializer.toJson<String>(ownerId),
'completedTaskCount': serializer.toJson<int>(completedTaskCount),
'durationMinuteCountsJson':
serializer.toJson<String>(durationMinuteCountsJson),
'completionTimeBucketCountsJson':
serializer.toJson<String>(completionTimeBucketCountsJson),
'totalPushesBeforeCompletion':
serializer.toJson<int>(totalPushesBeforeCompletion),
'completedAfterPushCount':
serializer.toJson<int>(completedAfterPushCount),
'rewardCountsJson': serializer.toJson<String>(rewardCountsJson),
'difficultyCountsJson': serializer.toJson<String>(difficultyCountsJson),
'reminderProfileCountsJson':
serializer.toJson<String>(reminderProfileCountsJson),
'revision': serializer.toJson<int>(revision),
'createdAtUtc': serializer.toJson<DateTime>(createdAtUtc),
'updatedAtUtc': serializer.toJson<DateTime>(updatedAtUtc),
};
}
ProjectStatisticsRow copyWith(
{String? projectId,
String? ownerId,
int? completedTaskCount,
String? durationMinuteCountsJson,
String? completionTimeBucketCountsJson,
int? totalPushesBeforeCompletion,
int? completedAfterPushCount,
String? rewardCountsJson,
String? difficultyCountsJson,
String? reminderProfileCountsJson,
int? revision,
DateTime? createdAtUtc,
DateTime? updatedAtUtc}) =>
ProjectStatisticsRow(
projectId: projectId ?? this.projectId,
ownerId: ownerId ?? this.ownerId,
completedTaskCount: completedTaskCount ?? this.completedTaskCount,
durationMinuteCountsJson:
durationMinuteCountsJson ?? this.durationMinuteCountsJson,
completionTimeBucketCountsJson: completionTimeBucketCountsJson ??
this.completionTimeBucketCountsJson,
totalPushesBeforeCompletion:
totalPushesBeforeCompletion ?? this.totalPushesBeforeCompletion,
completedAfterPushCount:
completedAfterPushCount ?? this.completedAfterPushCount,
rewardCountsJson: rewardCountsJson ?? this.rewardCountsJson,
difficultyCountsJson: difficultyCountsJson ?? this.difficultyCountsJson,
reminderProfileCountsJson:
reminderProfileCountsJson ?? this.reminderProfileCountsJson,
revision: revision ?? this.revision,
createdAtUtc: createdAtUtc ?? this.createdAtUtc,
updatedAtUtc: updatedAtUtc ?? this.updatedAtUtc,
);
ProjectStatisticsRow copyWithCompanion(ProjectStatisticsTableCompanion data) {
return ProjectStatisticsRow(
projectId: data.projectId.present ? data.projectId.value : this.projectId,
ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,
completedTaskCount: data.completedTaskCount.present
? data.completedTaskCount.value
: this.completedTaskCount,
durationMinuteCountsJson: data.durationMinuteCountsJson.present
? data.durationMinuteCountsJson.value
: this.durationMinuteCountsJson,
completionTimeBucketCountsJson:
data.completionTimeBucketCountsJson.present
? data.completionTimeBucketCountsJson.value
: this.completionTimeBucketCountsJson,
totalPushesBeforeCompletion: data.totalPushesBeforeCompletion.present
? data.totalPushesBeforeCompletion.value
: this.totalPushesBeforeCompletion,
completedAfterPushCount: data.completedAfterPushCount.present
? data.completedAfterPushCount.value
: this.completedAfterPushCount,
rewardCountsJson: data.rewardCountsJson.present
? data.rewardCountsJson.value
: this.rewardCountsJson,
difficultyCountsJson: data.difficultyCountsJson.present
? data.difficultyCountsJson.value
: this.difficultyCountsJson,
reminderProfileCountsJson: data.reminderProfileCountsJson.present
? data.reminderProfileCountsJson.value
: this.reminderProfileCountsJson,
revision: data.revision.present ? data.revision.value : this.revision,
createdAtUtc: data.createdAtUtc.present
? data.createdAtUtc.value
: this.createdAtUtc,
updatedAtUtc: data.updatedAtUtc.present
? data.updatedAtUtc.value
: this.updatedAtUtc,
);
}
@override
String toString() {
return (StringBuffer('ProjectStatisticsRow(')
..write('projectId: $projectId, ')
..write('ownerId: $ownerId, ')
..write('completedTaskCount: $completedTaskCount, ')
..write('durationMinuteCountsJson: $durationMinuteCountsJson, ')
..write(
'completionTimeBucketCountsJson: $completionTimeBucketCountsJson, ')
..write('totalPushesBeforeCompletion: $totalPushesBeforeCompletion, ')
..write('completedAfterPushCount: $completedAfterPushCount, ')
..write('rewardCountsJson: $rewardCountsJson, ')
..write('difficultyCountsJson: $difficultyCountsJson, ')
..write('reminderProfileCountsJson: $reminderProfileCountsJson, ')
..write('revision: $revision, ')
..write('createdAtUtc: $createdAtUtc, ')
..write('updatedAtUtc: $updatedAtUtc')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(
projectId,
ownerId,
completedTaskCount,
durationMinuteCountsJson,
completionTimeBucketCountsJson,
totalPushesBeforeCompletion,
completedAfterPushCount,
rewardCountsJson,
difficultyCountsJson,
reminderProfileCountsJson,
revision,
createdAtUtc,
updatedAtUtc);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is ProjectStatisticsRow &&
other.projectId == this.projectId &&
other.ownerId == this.ownerId &&
other.completedTaskCount == this.completedTaskCount &&
other.durationMinuteCountsJson == this.durationMinuteCountsJson &&
other.completionTimeBucketCountsJson ==
this.completionTimeBucketCountsJson &&
other.totalPushesBeforeCompletion ==
this.totalPushesBeforeCompletion &&
other.completedAfterPushCount == this.completedAfterPushCount &&
other.rewardCountsJson == this.rewardCountsJson &&
other.difficultyCountsJson == this.difficultyCountsJson &&
other.reminderProfileCountsJson == this.reminderProfileCountsJson &&
other.revision == this.revision &&
other.createdAtUtc == this.createdAtUtc &&
other.updatedAtUtc == this.updatedAtUtc);
}
class ProjectStatisticsTableCompanion
extends UpdateCompanion<ProjectStatisticsRow> {
final Value<String> projectId;
final Value<String> ownerId;
final Value<int> completedTaskCount;
final Value<String> durationMinuteCountsJson;
final Value<String> completionTimeBucketCountsJson;
final Value<int> totalPushesBeforeCompletion;
final Value<int> completedAfterPushCount;
final Value<String> rewardCountsJson;
final Value<String> difficultyCountsJson;
final Value<String> reminderProfileCountsJson;
final Value<int> revision;
final Value<DateTime> createdAtUtc;
final Value<DateTime> updatedAtUtc;
final Value<int> rowid;
const ProjectStatisticsTableCompanion({
this.projectId = const Value.absent(),
this.ownerId = const Value.absent(),
this.completedTaskCount = const Value.absent(),
this.durationMinuteCountsJson = const Value.absent(),
this.completionTimeBucketCountsJson = const Value.absent(),
this.totalPushesBeforeCompletion = const Value.absent(),
this.completedAfterPushCount = const Value.absent(),
this.rewardCountsJson = const Value.absent(),
this.difficultyCountsJson = const Value.absent(),
this.reminderProfileCountsJson = const Value.absent(),
this.revision = const Value.absent(),
this.createdAtUtc = const Value.absent(),
this.updatedAtUtc = const Value.absent(),
this.rowid = const Value.absent(),
});
ProjectStatisticsTableCompanion.insert({
required String projectId,
required String ownerId,
required int completedTaskCount,
required String durationMinuteCountsJson,
required String completionTimeBucketCountsJson,
required int totalPushesBeforeCompletion,
required int completedAfterPushCount,
required String rewardCountsJson,
required String difficultyCountsJson,
required String reminderProfileCountsJson,
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
this.rowid = const Value.absent(),
}) : projectId = Value(projectId),
ownerId = Value(ownerId),
completedTaskCount = Value(completedTaskCount),
durationMinuteCountsJson = Value(durationMinuteCountsJson),
completionTimeBucketCountsJson = Value(completionTimeBucketCountsJson),
totalPushesBeforeCompletion = Value(totalPushesBeforeCompletion),
completedAfterPushCount = Value(completedAfterPushCount),
rewardCountsJson = Value(rewardCountsJson),
difficultyCountsJson = Value(difficultyCountsJson),
reminderProfileCountsJson = Value(reminderProfileCountsJson),
revision = Value(revision),
createdAtUtc = Value(createdAtUtc),
updatedAtUtc = Value(updatedAtUtc);
static Insertable<ProjectStatisticsRow> custom({
Expression<String>? projectId,
Expression<String>? ownerId,
Expression<int>? completedTaskCount,
Expression<String>? durationMinuteCountsJson,
Expression<String>? completionTimeBucketCountsJson,
Expression<int>? totalPushesBeforeCompletion,
Expression<int>? completedAfterPushCount,
Expression<String>? rewardCountsJson,
Expression<String>? difficultyCountsJson,
Expression<String>? reminderProfileCountsJson,
Expression<int>? revision,
Expression<DateTime>? createdAtUtc,
Expression<DateTime>? updatedAtUtc,
Expression<int>? rowid,
}) {
return RawValuesInsertable({
if (projectId != null) 'project_id': projectId,
if (ownerId != null) 'owner_id': ownerId,
if (completedTaskCount != null)
'completed_task_count': completedTaskCount,
if (durationMinuteCountsJson != null)
'duration_minute_counts_json': durationMinuteCountsJson,
if (completionTimeBucketCountsJson != null)
'completion_time_bucket_counts_json': completionTimeBucketCountsJson,
if (totalPushesBeforeCompletion != null)
'total_pushes_before_completion': totalPushesBeforeCompletion,
if (completedAfterPushCount != null)
'completed_after_push_count': completedAfterPushCount,
if (rewardCountsJson != null) 'reward_counts_json': rewardCountsJson,
if (difficultyCountsJson != null)
'difficulty_counts_json': difficultyCountsJson,
if (reminderProfileCountsJson != null)
'reminder_profile_counts_json': reminderProfileCountsJson,
if (revision != null) 'revision': revision,
if (createdAtUtc != null) 'created_at_utc': createdAtUtc,
if (updatedAtUtc != null) 'updated_at_utc': updatedAtUtc,
if (rowid != null) 'rowid': rowid,
});
}
ProjectStatisticsTableCompanion copyWith(
{Value<String>? projectId,
Value<String>? ownerId,
Value<int>? completedTaskCount,
Value<String>? durationMinuteCountsJson,
Value<String>? completionTimeBucketCountsJson,
Value<int>? totalPushesBeforeCompletion,
Value<int>? completedAfterPushCount,
Value<String>? rewardCountsJson,
Value<String>? difficultyCountsJson,
Value<String>? reminderProfileCountsJson,
Value<int>? revision,
Value<DateTime>? createdAtUtc,
Value<DateTime>? updatedAtUtc,
Value<int>? rowid}) {
return ProjectStatisticsTableCompanion(
projectId: projectId ?? this.projectId,
ownerId: ownerId ?? this.ownerId,
completedTaskCount: completedTaskCount ?? this.completedTaskCount,
durationMinuteCountsJson:
durationMinuteCountsJson ?? this.durationMinuteCountsJson,
completionTimeBucketCountsJson:
completionTimeBucketCountsJson ?? this.completionTimeBucketCountsJson,
totalPushesBeforeCompletion:
totalPushesBeforeCompletion ?? this.totalPushesBeforeCompletion,
completedAfterPushCount:
completedAfterPushCount ?? this.completedAfterPushCount,
rewardCountsJson: rewardCountsJson ?? this.rewardCountsJson,
difficultyCountsJson: difficultyCountsJson ?? this.difficultyCountsJson,
reminderProfileCountsJson:
reminderProfileCountsJson ?? this.reminderProfileCountsJson,
revision: revision ?? this.revision,
createdAtUtc: createdAtUtc ?? this.createdAtUtc,
updatedAtUtc: updatedAtUtc ?? this.updatedAtUtc,
rowid: rowid ?? this.rowid,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (projectId.present) {
map['project_id'] = Variable<String>(projectId.value);
}
if (ownerId.present) {
map['owner_id'] = Variable<String>(ownerId.value);
}
if (completedTaskCount.present) {
map['completed_task_count'] = Variable<int>(completedTaskCount.value);
}
if (durationMinuteCountsJson.present) {
map['duration_minute_counts_json'] =
Variable<String>(durationMinuteCountsJson.value);
}
if (completionTimeBucketCountsJson.present) {
map['completion_time_bucket_counts_json'] =
Variable<String>(completionTimeBucketCountsJson.value);
}
if (totalPushesBeforeCompletion.present) {
map['total_pushes_before_completion'] =
Variable<int>(totalPushesBeforeCompletion.value);
}
if (completedAfterPushCount.present) {
map['completed_after_push_count'] =
Variable<int>(completedAfterPushCount.value);
}
if (rewardCountsJson.present) {
map['reward_counts_json'] = Variable<String>(rewardCountsJson.value);
}
if (difficultyCountsJson.present) {
map['difficulty_counts_json'] =
Variable<String>(difficultyCountsJson.value);
}
if (reminderProfileCountsJson.present) {
map['reminder_profile_counts_json'] =
Variable<String>(reminderProfileCountsJson.value);
}
if (revision.present) {
map['revision'] = Variable<int>(revision.value);
}
if (createdAtUtc.present) {
map['created_at_utc'] = Variable<DateTime>(createdAtUtc.value);
}
if (updatedAtUtc.present) {
map['updated_at_utc'] = Variable<DateTime>(updatedAtUtc.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(rowid.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('ProjectStatisticsTableCompanion(')
..write('projectId: $projectId, ')
..write('ownerId: $ownerId, ')
..write('completedTaskCount: $completedTaskCount, ')
..write('durationMinuteCountsJson: $durationMinuteCountsJson, ')
..write(
'completionTimeBucketCountsJson: $completionTimeBucketCountsJson, ')
..write('totalPushesBeforeCompletion: $totalPushesBeforeCompletion, ')
..write('completedAfterPushCount: $completedAfterPushCount, ')
..write('rewardCountsJson: $rewardCountsJson, ')
..write('difficultyCountsJson: $difficultyCountsJson, ')
..write('reminderProfileCountsJson: $reminderProfileCountsJson, ')
..write('revision: $revision, ')
..write('createdAtUtc: $createdAtUtc, ')
..write('updatedAtUtc: $updatedAtUtc, ')
..write('rowid: $rowid')
..write(')'))
.toString();
}
}
class $LockedBlocksTable extends LockedBlocks
with TableInfo<$LockedBlocksTable, LockedBlockRow> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$LockedBlocksTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _idMeta = const VerificationMeta('id');
@override
late final GeneratedColumn<String> id = GeneratedColumn<String>(
'id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _ownerIdMeta =
const VerificationMeta('ownerId');
@override
late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(
'owner_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _nameMeta = const VerificationMeta('name');
@override
late final GeneratedColumn<String> name = GeneratedColumn<String>(
'name', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _dateMeta = const VerificationMeta('date');
@override
late final GeneratedColumn<String> date = GeneratedColumn<String>(
'date', aliasedName, true,
type: DriftSqlType.string, requiredDuringInsert: false);
static const VerificationMeta _startTimeMeta =
const VerificationMeta('startTime');
@override
late final GeneratedColumn<String> startTime = GeneratedColumn<String>(
'start_time', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _endTimeMeta =
const VerificationMeta('endTime');
@override
late final GeneratedColumn<String> endTime = GeneratedColumn<String>(
'end_time', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _recurrenceJsonMeta =
const VerificationMeta('recurrenceJson');
@override
late final GeneratedColumn<String> recurrenceJson = GeneratedColumn<String>(
'recurrence_json', aliasedName, true,
type: DriftSqlType.string, requiredDuringInsert: false);
static const VerificationMeta _hiddenByDefaultMeta =
const VerificationMeta('hiddenByDefault');
@override
late final GeneratedColumn<bool> hiddenByDefault = GeneratedColumn<bool>(
'hidden_by_default', aliasedName, false,
type: DriftSqlType.bool,
requiredDuringInsert: true,
defaultConstraints: GeneratedColumn.constraintIsAlways(
'CHECK ("hidden_by_default" IN (0, 1))'));
static const VerificationMeta _projectIdMeta =
const VerificationMeta('projectId');
@override
late final GeneratedColumn<String> projectId = GeneratedColumn<String>(
'project_id', aliasedName, true,
type: DriftSqlType.string, requiredDuringInsert: false);
static const VerificationMeta _archivedAtUtcMeta =
const VerificationMeta('archivedAtUtc');
@override
late final GeneratedColumn<DateTime> archivedAtUtc =
GeneratedColumn<DateTime>('archived_at_utc', aliasedName, true,
type: DriftSqlType.dateTime, requiredDuringInsert: false);
static const VerificationMeta _revisionMeta =
const VerificationMeta('revision');
@override
late final GeneratedColumn<int> revision = GeneratedColumn<int>(
'revision', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _createdAtUtcMeta =
const VerificationMeta('createdAtUtc');
@override
late final GeneratedColumn<DateTime> createdAtUtc = GeneratedColumn<DateTime>(
'created_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
static const VerificationMeta _updatedAtUtcMeta =
const VerificationMeta('updatedAtUtc');
@override
late final GeneratedColumn<DateTime> updatedAtUtc = GeneratedColumn<DateTime>(
'updated_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
@override
List<GeneratedColumn> get $columns => [
id,
ownerId,
name,
date,
startTime,
endTime,
recurrenceJson,
hiddenByDefault,
projectId,
archivedAtUtc,
revision,
createdAtUtc,
updatedAtUtc
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'locked_blocks';
@override
VerificationContext validateIntegrity(Insertable<LockedBlockRow> instance,
{bool isInserting = false}) {
final context = VerificationContext();
final data = instance.toColumns(true);
if (data.containsKey('id')) {
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
} else if (isInserting) {
context.missing(_idMeta);
}
if (data.containsKey('owner_id')) {
context.handle(_ownerIdMeta,
ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta));
} else if (isInserting) {
context.missing(_ownerIdMeta);
}
if (data.containsKey('name')) {
context.handle(
_nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta));
} else if (isInserting) {
context.missing(_nameMeta);
}
if (data.containsKey('date')) {
context.handle(
_dateMeta, date.isAcceptableOrUnknown(data['date']!, _dateMeta));
}
if (data.containsKey('start_time')) {
context.handle(_startTimeMeta,
startTime.isAcceptableOrUnknown(data['start_time']!, _startTimeMeta));
} else if (isInserting) {
context.missing(_startTimeMeta);
}
if (data.containsKey('end_time')) {
context.handle(_endTimeMeta,
endTime.isAcceptableOrUnknown(data['end_time']!, _endTimeMeta));
} else if (isInserting) {
context.missing(_endTimeMeta);
}
if (data.containsKey('recurrence_json')) {
context.handle(
_recurrenceJsonMeta,
recurrenceJson.isAcceptableOrUnknown(
data['recurrence_json']!, _recurrenceJsonMeta));
}
if (data.containsKey('hidden_by_default')) {
context.handle(
_hiddenByDefaultMeta,
hiddenByDefault.isAcceptableOrUnknown(
data['hidden_by_default']!, _hiddenByDefaultMeta));
} else if (isInserting) {
context.missing(_hiddenByDefaultMeta);
}
if (data.containsKey('project_id')) {
context.handle(_projectIdMeta,
projectId.isAcceptableOrUnknown(data['project_id']!, _projectIdMeta));
}
if (data.containsKey('archived_at_utc')) {
context.handle(
_archivedAtUtcMeta,
archivedAtUtc.isAcceptableOrUnknown(
data['archived_at_utc']!, _archivedAtUtcMeta));
}
if (data.containsKey('revision')) {
context.handle(_revisionMeta,
revision.isAcceptableOrUnknown(data['revision']!, _revisionMeta));
} else if (isInserting) {
context.missing(_revisionMeta);
}
if (data.containsKey('created_at_utc')) {
context.handle(
_createdAtUtcMeta,
createdAtUtc.isAcceptableOrUnknown(
data['created_at_utc']!, _createdAtUtcMeta));
} else if (isInserting) {
context.missing(_createdAtUtcMeta);
}
if (data.containsKey('updated_at_utc')) {
context.handle(
_updatedAtUtcMeta,
updatedAtUtc.isAcceptableOrUnknown(
data['updated_at_utc']!, _updatedAtUtcMeta));
} else if (isInserting) {
context.missing(_updatedAtUtcMeta);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {id};
@override
LockedBlockRow map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return LockedBlockRow(
id: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}id'])!,
ownerId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,
name: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}name'])!,
date: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}date']),
startTime: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}start_time'])!,
endTime: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}end_time'])!,
recurrenceJson: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}recurrence_json']),
hiddenByDefault: attachedDatabase.typeMapping.read(
DriftSqlType.bool, data['${effectivePrefix}hidden_by_default'])!,
projectId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}project_id']),
archivedAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}archived_at_utc']),
revision: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}revision'])!,
createdAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}created_at_utc'])!,
updatedAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}updated_at_utc'])!,
);
}
@override
$LockedBlocksTable createAlias(String alias) {
return $LockedBlocksTable(attachedDatabase, alias);
}
}
class LockedBlockRow extends DataClass implements Insertable<LockedBlockRow> {
/// Returns the derived `id` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String id;
/// Returns the derived `ownerId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String ownerId;
/// Returns the derived `name` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String name;
/// Returns the derived `date` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String? date;
/// Returns the derived `startTime` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String startTime;
/// Returns the derived `endTime` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String endTime;
/// Converts scheduler data for `recurrenceJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String? recurrenceJson;
/// Returns the derived `hiddenByDefault` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final bool hiddenByDefault;
/// Returns the derived `projectId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String? projectId;
/// Returns the derived `archivedAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime? archivedAtUtc;
/// Returns the derived `revision` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final int revision;
/// Returns the derived `createdAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime createdAtUtc;
/// Returns the derived `updatedAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime updatedAtUtc;
const LockedBlockRow(
{required this.id,
required this.ownerId,
required this.name,
this.date,
required this.startTime,
required this.endTime,
this.recurrenceJson,
required this.hiddenByDefault,
this.projectId,
this.archivedAtUtc,
required this.revision,
required this.createdAtUtc,
required this.updatedAtUtc});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<String>(id);
map['owner_id'] = Variable<String>(ownerId);
map['name'] = Variable<String>(name);
if (!nullToAbsent || date != null) {
map['date'] = Variable<String>(date);
}
map['start_time'] = Variable<String>(startTime);
map['end_time'] = Variable<String>(endTime);
if (!nullToAbsent || recurrenceJson != null) {
map['recurrence_json'] = Variable<String>(recurrenceJson);
}
map['hidden_by_default'] = Variable<bool>(hiddenByDefault);
if (!nullToAbsent || projectId != null) {
map['project_id'] = Variable<String>(projectId);
}
if (!nullToAbsent || archivedAtUtc != null) {
map['archived_at_utc'] = Variable<DateTime>(archivedAtUtc);
}
map['revision'] = Variable<int>(revision);
map['created_at_utc'] = Variable<DateTime>(createdAtUtc);
map['updated_at_utc'] = Variable<DateTime>(updatedAtUtc);
return map;
}
LockedBlocksCompanion toCompanion(bool nullToAbsent) {
return LockedBlocksCompanion(
id: Value(id),
ownerId: Value(ownerId),
name: Value(name),
date: date == null && nullToAbsent ? const Value.absent() : Value(date),
startTime: Value(startTime),
endTime: Value(endTime),
recurrenceJson: recurrenceJson == null && nullToAbsent
? const Value.absent()
: Value(recurrenceJson),
hiddenByDefault: Value(hiddenByDefault),
projectId: projectId == null && nullToAbsent
? const Value.absent()
: Value(projectId),
archivedAtUtc: archivedAtUtc == null && nullToAbsent
? const Value.absent()
: Value(archivedAtUtc),
revision: Value(revision),
createdAtUtc: Value(createdAtUtc),
updatedAtUtc: Value(updatedAtUtc),
);
}
factory LockedBlockRow.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return LockedBlockRow(
id: serializer.fromJson<String>(json['id']),
ownerId: serializer.fromJson<String>(json['ownerId']),
name: serializer.fromJson<String>(json['name']),
date: serializer.fromJson<String?>(json['date']),
startTime: serializer.fromJson<String>(json['startTime']),
endTime: serializer.fromJson<String>(json['endTime']),
recurrenceJson: serializer.fromJson<String?>(json['recurrenceJson']),
hiddenByDefault: serializer.fromJson<bool>(json['hiddenByDefault']),
projectId: serializer.fromJson<String?>(json['projectId']),
archivedAtUtc: serializer.fromJson<DateTime?>(json['archivedAtUtc']),
revision: serializer.fromJson<int>(json['revision']),
createdAtUtc: serializer.fromJson<DateTime>(json['createdAtUtc']),
updatedAtUtc: serializer.fromJson<DateTime>(json['updatedAtUtc']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'id': serializer.toJson<String>(id),
'ownerId': serializer.toJson<String>(ownerId),
'name': serializer.toJson<String>(name),
'date': serializer.toJson<String?>(date),
'startTime': serializer.toJson<String>(startTime),
'endTime': serializer.toJson<String>(endTime),
'recurrenceJson': serializer.toJson<String?>(recurrenceJson),
'hiddenByDefault': serializer.toJson<bool>(hiddenByDefault),
'projectId': serializer.toJson<String?>(projectId),
'archivedAtUtc': serializer.toJson<DateTime?>(archivedAtUtc),
'revision': serializer.toJson<int>(revision),
'createdAtUtc': serializer.toJson<DateTime>(createdAtUtc),
'updatedAtUtc': serializer.toJson<DateTime>(updatedAtUtc),
};
}
LockedBlockRow copyWith(
{String? id,
String? ownerId,
String? name,
Value<String?> date = const Value.absent(),
String? startTime,
String? endTime,
Value<String?> recurrenceJson = const Value.absent(),
bool? hiddenByDefault,
Value<String?> projectId = const Value.absent(),
Value<DateTime?> archivedAtUtc = const Value.absent(),
int? revision,
DateTime? createdAtUtc,
DateTime? updatedAtUtc}) =>
LockedBlockRow(
id: id ?? this.id,
ownerId: ownerId ?? this.ownerId,
name: name ?? this.name,
date: date.present ? date.value : this.date,
startTime: startTime ?? this.startTime,
endTime: endTime ?? this.endTime,
recurrenceJson:
recurrenceJson.present ? recurrenceJson.value : this.recurrenceJson,
hiddenByDefault: hiddenByDefault ?? this.hiddenByDefault,
projectId: projectId.present ? projectId.value : this.projectId,
archivedAtUtc:
archivedAtUtc.present ? archivedAtUtc.value : this.archivedAtUtc,
revision: revision ?? this.revision,
createdAtUtc: createdAtUtc ?? this.createdAtUtc,
updatedAtUtc: updatedAtUtc ?? this.updatedAtUtc,
);
LockedBlockRow copyWithCompanion(LockedBlocksCompanion data) {
return LockedBlockRow(
id: data.id.present ? data.id.value : this.id,
ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,
name: data.name.present ? data.name.value : this.name,
date: data.date.present ? data.date.value : this.date,
startTime: data.startTime.present ? data.startTime.value : this.startTime,
endTime: data.endTime.present ? data.endTime.value : this.endTime,
recurrenceJson: data.recurrenceJson.present
? data.recurrenceJson.value
: this.recurrenceJson,
hiddenByDefault: data.hiddenByDefault.present
? data.hiddenByDefault.value
: this.hiddenByDefault,
projectId: data.projectId.present ? data.projectId.value : this.projectId,
archivedAtUtc: data.archivedAtUtc.present
? data.archivedAtUtc.value
: this.archivedAtUtc,
revision: data.revision.present ? data.revision.value : this.revision,
createdAtUtc: data.createdAtUtc.present
? data.createdAtUtc.value
: this.createdAtUtc,
updatedAtUtc: data.updatedAtUtc.present
? data.updatedAtUtc.value
: this.updatedAtUtc,
);
}
@override
String toString() {
return (StringBuffer('LockedBlockRow(')
..write('id: $id, ')
..write('ownerId: $ownerId, ')
..write('name: $name, ')
..write('date: $date, ')
..write('startTime: $startTime, ')
..write('endTime: $endTime, ')
..write('recurrenceJson: $recurrenceJson, ')
..write('hiddenByDefault: $hiddenByDefault, ')
..write('projectId: $projectId, ')
..write('archivedAtUtc: $archivedAtUtc, ')
..write('revision: $revision, ')
..write('createdAtUtc: $createdAtUtc, ')
..write('updatedAtUtc: $updatedAtUtc')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(
id,
ownerId,
name,
date,
startTime,
endTime,
recurrenceJson,
hiddenByDefault,
projectId,
archivedAtUtc,
revision,
createdAtUtc,
updatedAtUtc);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is LockedBlockRow &&
other.id == this.id &&
other.ownerId == this.ownerId &&
other.name == this.name &&
other.date == this.date &&
other.startTime == this.startTime &&
other.endTime == this.endTime &&
other.recurrenceJson == this.recurrenceJson &&
other.hiddenByDefault == this.hiddenByDefault &&
other.projectId == this.projectId &&
other.archivedAtUtc == this.archivedAtUtc &&
other.revision == this.revision &&
other.createdAtUtc == this.createdAtUtc &&
other.updatedAtUtc == this.updatedAtUtc);
}
class LockedBlocksCompanion extends UpdateCompanion<LockedBlockRow> {
final Value<String> id;
final Value<String> ownerId;
final Value<String> name;
final Value<String?> date;
final Value<String> startTime;
final Value<String> endTime;
final Value<String?> recurrenceJson;
final Value<bool> hiddenByDefault;
final Value<String?> projectId;
final Value<DateTime?> archivedAtUtc;
final Value<int> revision;
final Value<DateTime> createdAtUtc;
final Value<DateTime> updatedAtUtc;
final Value<int> rowid;
const LockedBlocksCompanion({
this.id = const Value.absent(),
this.ownerId = const Value.absent(),
this.name = const Value.absent(),
this.date = const Value.absent(),
this.startTime = const Value.absent(),
this.endTime = const Value.absent(),
this.recurrenceJson = const Value.absent(),
this.hiddenByDefault = const Value.absent(),
this.projectId = const Value.absent(),
this.archivedAtUtc = const Value.absent(),
this.revision = const Value.absent(),
this.createdAtUtc = const Value.absent(),
this.updatedAtUtc = const Value.absent(),
this.rowid = const Value.absent(),
});
LockedBlocksCompanion.insert({
required String id,
required String ownerId,
required String name,
this.date = const Value.absent(),
required String startTime,
required String endTime,
this.recurrenceJson = const Value.absent(),
required bool hiddenByDefault,
this.projectId = const Value.absent(),
this.archivedAtUtc = const Value.absent(),
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
this.rowid = const Value.absent(),
}) : id = Value(id),
ownerId = Value(ownerId),
name = Value(name),
startTime = Value(startTime),
endTime = Value(endTime),
hiddenByDefault = Value(hiddenByDefault),
revision = Value(revision),
createdAtUtc = Value(createdAtUtc),
updatedAtUtc = Value(updatedAtUtc);
static Insertable<LockedBlockRow> custom({
Expression<String>? id,
Expression<String>? ownerId,
Expression<String>? name,
Expression<String>? date,
Expression<String>? startTime,
Expression<String>? endTime,
Expression<String>? recurrenceJson,
Expression<bool>? hiddenByDefault,
Expression<String>? projectId,
Expression<DateTime>? archivedAtUtc,
Expression<int>? revision,
Expression<DateTime>? createdAtUtc,
Expression<DateTime>? updatedAtUtc,
Expression<int>? rowid,
}) {
return RawValuesInsertable({
if (id != null) 'id': id,
if (ownerId != null) 'owner_id': ownerId,
if (name != null) 'name': name,
if (date != null) 'date': date,
if (startTime != null) 'start_time': startTime,
if (endTime != null) 'end_time': endTime,
if (recurrenceJson != null) 'recurrence_json': recurrenceJson,
if (hiddenByDefault != null) 'hidden_by_default': hiddenByDefault,
if (projectId != null) 'project_id': projectId,
if (archivedAtUtc != null) 'archived_at_utc': archivedAtUtc,
if (revision != null) 'revision': revision,
if (createdAtUtc != null) 'created_at_utc': createdAtUtc,
if (updatedAtUtc != null) 'updated_at_utc': updatedAtUtc,
if (rowid != null) 'rowid': rowid,
});
}
LockedBlocksCompanion copyWith(
{Value<String>? id,
Value<String>? ownerId,
Value<String>? name,
Value<String?>? date,
Value<String>? startTime,
Value<String>? endTime,
Value<String?>? recurrenceJson,
Value<bool>? hiddenByDefault,
Value<String?>? projectId,
Value<DateTime?>? archivedAtUtc,
Value<int>? revision,
Value<DateTime>? createdAtUtc,
Value<DateTime>? updatedAtUtc,
Value<int>? rowid}) {
return LockedBlocksCompanion(
id: id ?? this.id,
ownerId: ownerId ?? this.ownerId,
name: name ?? this.name,
date: date ?? this.date,
startTime: startTime ?? this.startTime,
endTime: endTime ?? this.endTime,
recurrenceJson: recurrenceJson ?? this.recurrenceJson,
hiddenByDefault: hiddenByDefault ?? this.hiddenByDefault,
projectId: projectId ?? this.projectId,
archivedAtUtc: archivedAtUtc ?? this.archivedAtUtc,
revision: revision ?? this.revision,
createdAtUtc: createdAtUtc ?? this.createdAtUtc,
updatedAtUtc: updatedAtUtc ?? this.updatedAtUtc,
rowid: rowid ?? this.rowid,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (id.present) {
map['id'] = Variable<String>(id.value);
}
if (ownerId.present) {
map['owner_id'] = Variable<String>(ownerId.value);
}
if (name.present) {
map['name'] = Variable<String>(name.value);
}
if (date.present) {
map['date'] = Variable<String>(date.value);
}
if (startTime.present) {
map['start_time'] = Variable<String>(startTime.value);
}
if (endTime.present) {
map['end_time'] = Variable<String>(endTime.value);
}
if (recurrenceJson.present) {
map['recurrence_json'] = Variable<String>(recurrenceJson.value);
}
if (hiddenByDefault.present) {
map['hidden_by_default'] = Variable<bool>(hiddenByDefault.value);
}
if (projectId.present) {
map['project_id'] = Variable<String>(projectId.value);
}
if (archivedAtUtc.present) {
map['archived_at_utc'] = Variable<DateTime>(archivedAtUtc.value);
}
if (revision.present) {
map['revision'] = Variable<int>(revision.value);
}
if (createdAtUtc.present) {
map['created_at_utc'] = Variable<DateTime>(createdAtUtc.value);
}
if (updatedAtUtc.present) {
map['updated_at_utc'] = Variable<DateTime>(updatedAtUtc.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(rowid.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('LockedBlocksCompanion(')
..write('id: $id, ')
..write('ownerId: $ownerId, ')
..write('name: $name, ')
..write('date: $date, ')
..write('startTime: $startTime, ')
..write('endTime: $endTime, ')
..write('recurrenceJson: $recurrenceJson, ')
..write('hiddenByDefault: $hiddenByDefault, ')
..write('projectId: $projectId, ')
..write('archivedAtUtc: $archivedAtUtc, ')
..write('revision: $revision, ')
..write('createdAtUtc: $createdAtUtc, ')
..write('updatedAtUtc: $updatedAtUtc, ')
..write('rowid: $rowid')
..write(')'))
.toString();
}
}
class $LockedOverridesTable extends LockedOverrides
with TableInfo<$LockedOverridesTable, LockedOverrideRow> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$LockedOverridesTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _idMeta = const VerificationMeta('id');
@override
late final GeneratedColumn<String> id = GeneratedColumn<String>(
'id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _ownerIdMeta =
const VerificationMeta('ownerId');
@override
late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(
'owner_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _lockedBlockIdMeta =
const VerificationMeta('lockedBlockId');
@override
late final GeneratedColumn<String> lockedBlockId = GeneratedColumn<String>(
'locked_block_id', aliasedName, true,
type: DriftSqlType.string, requiredDuringInsert: false);
static const VerificationMeta _dateMeta = const VerificationMeta('date');
@override
late final GeneratedColumn<String> date = GeneratedColumn<String>(
'date', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _typeMeta = const VerificationMeta('type');
@override
late final GeneratedColumn<String> type = GeneratedColumn<String>(
'type', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _nameMeta = const VerificationMeta('name');
@override
late final GeneratedColumn<String> name = GeneratedColumn<String>(
'name', aliasedName, true,
type: DriftSqlType.string, requiredDuringInsert: false);
static const VerificationMeta _startTimeMeta =
const VerificationMeta('startTime');
@override
late final GeneratedColumn<String> startTime = GeneratedColumn<String>(
'start_time', aliasedName, true,
type: DriftSqlType.string, requiredDuringInsert: false);
static const VerificationMeta _endTimeMeta =
const VerificationMeta('endTime');
@override
late final GeneratedColumn<String> endTime = GeneratedColumn<String>(
'end_time', aliasedName, true,
type: DriftSqlType.string, requiredDuringInsert: false);
static const VerificationMeta _hiddenByDefaultMeta =
const VerificationMeta('hiddenByDefault');
@override
late final GeneratedColumn<bool> hiddenByDefault = GeneratedColumn<bool>(
'hidden_by_default', aliasedName, false,
type: DriftSqlType.bool,
requiredDuringInsert: true,
defaultConstraints: GeneratedColumn.constraintIsAlways(
'CHECK ("hidden_by_default" IN (0, 1))'));
static const VerificationMeta _projectIdMeta =
const VerificationMeta('projectId');
@override
late final GeneratedColumn<String> projectId = GeneratedColumn<String>(
'project_id', aliasedName, true,
type: DriftSqlType.string, requiredDuringInsert: false);
static const VerificationMeta _revisionMeta =
const VerificationMeta('revision');
@override
late final GeneratedColumn<int> revision = GeneratedColumn<int>(
'revision', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _createdAtUtcMeta =
const VerificationMeta('createdAtUtc');
@override
late final GeneratedColumn<DateTime> createdAtUtc = GeneratedColumn<DateTime>(
'created_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
static const VerificationMeta _updatedAtUtcMeta =
const VerificationMeta('updatedAtUtc');
@override
late final GeneratedColumn<DateTime> updatedAtUtc = GeneratedColumn<DateTime>(
'updated_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
@override
List<GeneratedColumn> get $columns => [
id,
ownerId,
lockedBlockId,
date,
type,
name,
startTime,
endTime,
hiddenByDefault,
projectId,
revision,
createdAtUtc,
updatedAtUtc
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'locked_overrides';
@override
VerificationContext validateIntegrity(Insertable<LockedOverrideRow> instance,
{bool isInserting = false}) {
final context = VerificationContext();
final data = instance.toColumns(true);
if (data.containsKey('id')) {
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
} else if (isInserting) {
context.missing(_idMeta);
}
if (data.containsKey('owner_id')) {
context.handle(_ownerIdMeta,
ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta));
} else if (isInserting) {
context.missing(_ownerIdMeta);
}
if (data.containsKey('locked_block_id')) {
context.handle(
_lockedBlockIdMeta,
lockedBlockId.isAcceptableOrUnknown(
data['locked_block_id']!, _lockedBlockIdMeta));
}
if (data.containsKey('date')) {
context.handle(
_dateMeta, date.isAcceptableOrUnknown(data['date']!, _dateMeta));
} else if (isInserting) {
context.missing(_dateMeta);
}
if (data.containsKey('type')) {
context.handle(
_typeMeta, type.isAcceptableOrUnknown(data['type']!, _typeMeta));
} else if (isInserting) {
context.missing(_typeMeta);
}
if (data.containsKey('name')) {
context.handle(
_nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta));
}
if (data.containsKey('start_time')) {
context.handle(_startTimeMeta,
startTime.isAcceptableOrUnknown(data['start_time']!, _startTimeMeta));
}
if (data.containsKey('end_time')) {
context.handle(_endTimeMeta,
endTime.isAcceptableOrUnknown(data['end_time']!, _endTimeMeta));
}
if (data.containsKey('hidden_by_default')) {
context.handle(
_hiddenByDefaultMeta,
hiddenByDefault.isAcceptableOrUnknown(
data['hidden_by_default']!, _hiddenByDefaultMeta));
} else if (isInserting) {
context.missing(_hiddenByDefaultMeta);
}
if (data.containsKey('project_id')) {
context.handle(_projectIdMeta,
projectId.isAcceptableOrUnknown(data['project_id']!, _projectIdMeta));
}
if (data.containsKey('revision')) {
context.handle(_revisionMeta,
revision.isAcceptableOrUnknown(data['revision']!, _revisionMeta));
} else if (isInserting) {
context.missing(_revisionMeta);
}
if (data.containsKey('created_at_utc')) {
context.handle(
_createdAtUtcMeta,
createdAtUtc.isAcceptableOrUnknown(
data['created_at_utc']!, _createdAtUtcMeta));
} else if (isInserting) {
context.missing(_createdAtUtcMeta);
}
if (data.containsKey('updated_at_utc')) {
context.handle(
_updatedAtUtcMeta,
updatedAtUtc.isAcceptableOrUnknown(
data['updated_at_utc']!, _updatedAtUtcMeta));
} else if (isInserting) {
context.missing(_updatedAtUtcMeta);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {id};
@override
LockedOverrideRow map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return LockedOverrideRow(
id: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}id'])!,
ownerId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,
lockedBlockId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}locked_block_id']),
date: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}date'])!,
type: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}type'])!,
name: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}name']),
startTime: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}start_time']),
endTime: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}end_time']),
hiddenByDefault: attachedDatabase.typeMapping.read(
DriftSqlType.bool, data['${effectivePrefix}hidden_by_default'])!,
projectId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}project_id']),
revision: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}revision'])!,
createdAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}created_at_utc'])!,
updatedAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}updated_at_utc'])!,
);
}
@override
$LockedOverridesTable createAlias(String alias) {
return $LockedOverridesTable(attachedDatabase, alias);
}
}
class LockedOverrideRow extends DataClass
implements Insertable<LockedOverrideRow> {
/// Returns the derived `id` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String id;
/// Returns the derived `ownerId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String ownerId;
/// Returns the derived `lockedBlockId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String? lockedBlockId;
/// Returns the derived `date` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String date;
/// Returns the derived `type` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String type;
/// Returns the derived `name` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String? name;
/// Returns the derived `startTime` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String? startTime;
/// Returns the derived `endTime` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String? endTime;
/// Returns the derived `hiddenByDefault` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final bool hiddenByDefault;
/// Returns the derived `projectId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String? projectId;
/// Returns the derived `revision` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final int revision;
/// Returns the derived `createdAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime createdAtUtc;
/// Returns the derived `updatedAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime updatedAtUtc;
const LockedOverrideRow(
{required this.id,
required this.ownerId,
this.lockedBlockId,
required this.date,
required this.type,
this.name,
this.startTime,
this.endTime,
required this.hiddenByDefault,
this.projectId,
required this.revision,
required this.createdAtUtc,
required this.updatedAtUtc});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<String>(id);
map['owner_id'] = Variable<String>(ownerId);
if (!nullToAbsent || lockedBlockId != null) {
map['locked_block_id'] = Variable<String>(lockedBlockId);
}
map['date'] = Variable<String>(date);
map['type'] = Variable<String>(type);
if (!nullToAbsent || name != null) {
map['name'] = Variable<String>(name);
}
if (!nullToAbsent || startTime != null) {
map['start_time'] = Variable<String>(startTime);
}
if (!nullToAbsent || endTime != null) {
map['end_time'] = Variable<String>(endTime);
}
map['hidden_by_default'] = Variable<bool>(hiddenByDefault);
if (!nullToAbsent || projectId != null) {
map['project_id'] = Variable<String>(projectId);
}
map['revision'] = Variable<int>(revision);
map['created_at_utc'] = Variable<DateTime>(createdAtUtc);
map['updated_at_utc'] = Variable<DateTime>(updatedAtUtc);
return map;
}
LockedOverridesCompanion toCompanion(bool nullToAbsent) {
return LockedOverridesCompanion(
id: Value(id),
ownerId: Value(ownerId),
lockedBlockId: lockedBlockId == null && nullToAbsent
? const Value.absent()
: Value(lockedBlockId),
date: Value(date),
type: Value(type),
name: name == null && nullToAbsent ? const Value.absent() : Value(name),
startTime: startTime == null && nullToAbsent
? const Value.absent()
: Value(startTime),
endTime: endTime == null && nullToAbsent
? const Value.absent()
: Value(endTime),
hiddenByDefault: Value(hiddenByDefault),
projectId: projectId == null && nullToAbsent
? const Value.absent()
: Value(projectId),
revision: Value(revision),
createdAtUtc: Value(createdAtUtc),
updatedAtUtc: Value(updatedAtUtc),
);
}
factory LockedOverrideRow.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return LockedOverrideRow(
id: serializer.fromJson<String>(json['id']),
ownerId: serializer.fromJson<String>(json['ownerId']),
lockedBlockId: serializer.fromJson<String?>(json['lockedBlockId']),
date: serializer.fromJson<String>(json['date']),
type: serializer.fromJson<String>(json['type']),
name: serializer.fromJson<String?>(json['name']),
startTime: serializer.fromJson<String?>(json['startTime']),
endTime: serializer.fromJson<String?>(json['endTime']),
hiddenByDefault: serializer.fromJson<bool>(json['hiddenByDefault']),
projectId: serializer.fromJson<String?>(json['projectId']),
revision: serializer.fromJson<int>(json['revision']),
createdAtUtc: serializer.fromJson<DateTime>(json['createdAtUtc']),
updatedAtUtc: serializer.fromJson<DateTime>(json['updatedAtUtc']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'id': serializer.toJson<String>(id),
'ownerId': serializer.toJson<String>(ownerId),
'lockedBlockId': serializer.toJson<String?>(lockedBlockId),
'date': serializer.toJson<String>(date),
'type': serializer.toJson<String>(type),
'name': serializer.toJson<String?>(name),
'startTime': serializer.toJson<String?>(startTime),
'endTime': serializer.toJson<String?>(endTime),
'hiddenByDefault': serializer.toJson<bool>(hiddenByDefault),
'projectId': serializer.toJson<String?>(projectId),
'revision': serializer.toJson<int>(revision),
'createdAtUtc': serializer.toJson<DateTime>(createdAtUtc),
'updatedAtUtc': serializer.toJson<DateTime>(updatedAtUtc),
};
}
LockedOverrideRow copyWith(
{String? id,
String? ownerId,
Value<String?> lockedBlockId = const Value.absent(),
String? date,
String? type,
Value<String?> name = const Value.absent(),
Value<String?> startTime = const Value.absent(),
Value<String?> endTime = const Value.absent(),
bool? hiddenByDefault,
Value<String?> projectId = const Value.absent(),
int? revision,
DateTime? createdAtUtc,
DateTime? updatedAtUtc}) =>
LockedOverrideRow(
id: id ?? this.id,
ownerId: ownerId ?? this.ownerId,
lockedBlockId:
lockedBlockId.present ? lockedBlockId.value : this.lockedBlockId,
date: date ?? this.date,
type: type ?? this.type,
name: name.present ? name.value : this.name,
startTime: startTime.present ? startTime.value : this.startTime,
endTime: endTime.present ? endTime.value : this.endTime,
hiddenByDefault: hiddenByDefault ?? this.hiddenByDefault,
projectId: projectId.present ? projectId.value : this.projectId,
revision: revision ?? this.revision,
createdAtUtc: createdAtUtc ?? this.createdAtUtc,
updatedAtUtc: updatedAtUtc ?? this.updatedAtUtc,
);
LockedOverrideRow copyWithCompanion(LockedOverridesCompanion data) {
return LockedOverrideRow(
id: data.id.present ? data.id.value : this.id,
ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,
lockedBlockId: data.lockedBlockId.present
? data.lockedBlockId.value
: this.lockedBlockId,
date: data.date.present ? data.date.value : this.date,
type: data.type.present ? data.type.value : this.type,
name: data.name.present ? data.name.value : this.name,
startTime: data.startTime.present ? data.startTime.value : this.startTime,
endTime: data.endTime.present ? data.endTime.value : this.endTime,
hiddenByDefault: data.hiddenByDefault.present
? data.hiddenByDefault.value
: this.hiddenByDefault,
projectId: data.projectId.present ? data.projectId.value : this.projectId,
revision: data.revision.present ? data.revision.value : this.revision,
createdAtUtc: data.createdAtUtc.present
? data.createdAtUtc.value
: this.createdAtUtc,
updatedAtUtc: data.updatedAtUtc.present
? data.updatedAtUtc.value
: this.updatedAtUtc,
);
}
@override
String toString() {
return (StringBuffer('LockedOverrideRow(')
..write('id: $id, ')
..write('ownerId: $ownerId, ')
..write('lockedBlockId: $lockedBlockId, ')
..write('date: $date, ')
..write('type: $type, ')
..write('name: $name, ')
..write('startTime: $startTime, ')
..write('endTime: $endTime, ')
..write('hiddenByDefault: $hiddenByDefault, ')
..write('projectId: $projectId, ')
..write('revision: $revision, ')
..write('createdAtUtc: $createdAtUtc, ')
..write('updatedAtUtc: $updatedAtUtc')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(
id,
ownerId,
lockedBlockId,
date,
type,
name,
startTime,
endTime,
hiddenByDefault,
projectId,
revision,
createdAtUtc,
updatedAtUtc);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is LockedOverrideRow &&
other.id == this.id &&
other.ownerId == this.ownerId &&
other.lockedBlockId == this.lockedBlockId &&
other.date == this.date &&
other.type == this.type &&
other.name == this.name &&
other.startTime == this.startTime &&
other.endTime == this.endTime &&
other.hiddenByDefault == this.hiddenByDefault &&
other.projectId == this.projectId &&
other.revision == this.revision &&
other.createdAtUtc == this.createdAtUtc &&
other.updatedAtUtc == this.updatedAtUtc);
}
class LockedOverridesCompanion extends UpdateCompanion<LockedOverrideRow> {
final Value<String> id;
final Value<String> ownerId;
final Value<String?> lockedBlockId;
final Value<String> date;
final Value<String> type;
final Value<String?> name;
final Value<String?> startTime;
final Value<String?> endTime;
final Value<bool> hiddenByDefault;
final Value<String?> projectId;
final Value<int> revision;
final Value<DateTime> createdAtUtc;
final Value<DateTime> updatedAtUtc;
final Value<int> rowid;
const LockedOverridesCompanion({
this.id = const Value.absent(),
this.ownerId = const Value.absent(),
this.lockedBlockId = const Value.absent(),
this.date = const Value.absent(),
this.type = const Value.absent(),
this.name = const Value.absent(),
this.startTime = const Value.absent(),
this.endTime = const Value.absent(),
this.hiddenByDefault = const Value.absent(),
this.projectId = const Value.absent(),
this.revision = const Value.absent(),
this.createdAtUtc = const Value.absent(),
this.updatedAtUtc = const Value.absent(),
this.rowid = const Value.absent(),
});
LockedOverridesCompanion.insert({
required String id,
required String ownerId,
this.lockedBlockId = const Value.absent(),
required String date,
required String type,
this.name = const Value.absent(),
this.startTime = const Value.absent(),
this.endTime = const Value.absent(),
required bool hiddenByDefault,
this.projectId = const Value.absent(),
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
this.rowid = const Value.absent(),
}) : id = Value(id),
ownerId = Value(ownerId),
date = Value(date),
type = Value(type),
hiddenByDefault = Value(hiddenByDefault),
revision = Value(revision),
createdAtUtc = Value(createdAtUtc),
updatedAtUtc = Value(updatedAtUtc);
static Insertable<LockedOverrideRow> custom({
Expression<String>? id,
Expression<String>? ownerId,
Expression<String>? lockedBlockId,
Expression<String>? date,
Expression<String>? type,
Expression<String>? name,
Expression<String>? startTime,
Expression<String>? endTime,
Expression<bool>? hiddenByDefault,
Expression<String>? projectId,
Expression<int>? revision,
Expression<DateTime>? createdAtUtc,
Expression<DateTime>? updatedAtUtc,
Expression<int>? rowid,
}) {
return RawValuesInsertable({
if (id != null) 'id': id,
if (ownerId != null) 'owner_id': ownerId,
if (lockedBlockId != null) 'locked_block_id': lockedBlockId,
if (date != null) 'date': date,
if (type != null) 'type': type,
if (name != null) 'name': name,
if (startTime != null) 'start_time': startTime,
if (endTime != null) 'end_time': endTime,
if (hiddenByDefault != null) 'hidden_by_default': hiddenByDefault,
if (projectId != null) 'project_id': projectId,
if (revision != null) 'revision': revision,
if (createdAtUtc != null) 'created_at_utc': createdAtUtc,
if (updatedAtUtc != null) 'updated_at_utc': updatedAtUtc,
if (rowid != null) 'rowid': rowid,
});
}
LockedOverridesCompanion copyWith(
{Value<String>? id,
Value<String>? ownerId,
Value<String?>? lockedBlockId,
Value<String>? date,
Value<String>? type,
Value<String?>? name,
Value<String?>? startTime,
Value<String?>? endTime,
Value<bool>? hiddenByDefault,
Value<String?>? projectId,
Value<int>? revision,
Value<DateTime>? createdAtUtc,
Value<DateTime>? updatedAtUtc,
Value<int>? rowid}) {
return LockedOverridesCompanion(
id: id ?? this.id,
ownerId: ownerId ?? this.ownerId,
lockedBlockId: lockedBlockId ?? this.lockedBlockId,
date: date ?? this.date,
type: type ?? this.type,
name: name ?? this.name,
startTime: startTime ?? this.startTime,
endTime: endTime ?? this.endTime,
hiddenByDefault: hiddenByDefault ?? this.hiddenByDefault,
projectId: projectId ?? this.projectId,
revision: revision ?? this.revision,
createdAtUtc: createdAtUtc ?? this.createdAtUtc,
updatedAtUtc: updatedAtUtc ?? this.updatedAtUtc,
rowid: rowid ?? this.rowid,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (id.present) {
map['id'] = Variable<String>(id.value);
}
if (ownerId.present) {
map['owner_id'] = Variable<String>(ownerId.value);
}
if (lockedBlockId.present) {
map['locked_block_id'] = Variable<String>(lockedBlockId.value);
}
if (date.present) {
map['date'] = Variable<String>(date.value);
}
if (type.present) {
map['type'] = Variable<String>(type.value);
}
if (name.present) {
map['name'] = Variable<String>(name.value);
}
if (startTime.present) {
map['start_time'] = Variable<String>(startTime.value);
}
if (endTime.present) {
map['end_time'] = Variable<String>(endTime.value);
}
if (hiddenByDefault.present) {
map['hidden_by_default'] = Variable<bool>(hiddenByDefault.value);
}
if (projectId.present) {
map['project_id'] = Variable<String>(projectId.value);
}
if (revision.present) {
map['revision'] = Variable<int>(revision.value);
}
if (createdAtUtc.present) {
map['created_at_utc'] = Variable<DateTime>(createdAtUtc.value);
}
if (updatedAtUtc.present) {
map['updated_at_utc'] = Variable<DateTime>(updatedAtUtc.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(rowid.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('LockedOverridesCompanion(')
..write('id: $id, ')
..write('ownerId: $ownerId, ')
..write('lockedBlockId: $lockedBlockId, ')
..write('date: $date, ')
..write('type: $type, ')
..write('name: $name, ')
..write('startTime: $startTime, ')
..write('endTime: $endTime, ')
..write('hiddenByDefault: $hiddenByDefault, ')
..write('projectId: $projectId, ')
..write('revision: $revision, ')
..write('createdAtUtc: $createdAtUtc, ')
..write('updatedAtUtc: $updatedAtUtc, ')
..write('rowid: $rowid')
..write(')'))
.toString();
}
}
class $SettingsTableTable extends SettingsTable
with TableInfo<$SettingsTableTable, SettingsRow> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$SettingsTableTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _ownerIdMeta =
const VerificationMeta('ownerId');
@override
late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(
'owner_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _timeZoneIdMeta =
const VerificationMeta('timeZoneId');
@override
late final GeneratedColumn<String> timeZoneId = GeneratedColumn<String>(
'timezone_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _dayStartMinutesMeta =
const VerificationMeta('dayStartMinutes');
@override
late final GeneratedColumn<int> dayStartMinutes = GeneratedColumn<int>(
'day_start_minutes', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _dayEndMinutesMeta =
const VerificationMeta('dayEndMinutes');
@override
late final GeneratedColumn<int> dayEndMinutes = GeneratedColumn<int>(
'day_end_minutes', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _compactModeMeta =
const VerificationMeta('compactMode');
@override
late final GeneratedColumn<bool> compactMode = GeneratedColumn<bool>(
'compact_mode', aliasedName, false,
type: DriftSqlType.bool,
requiredDuringInsert: true,
defaultConstraints: GeneratedColumn.constraintIsAlways(
'CHECK ("compact_mode" IN (0, 1))'));
static const VerificationMeta _backlogStalenessJsonMeta =
const VerificationMeta('backlogStalenessJson');
@override
late final GeneratedColumn<String> backlogStalenessJson =
GeneratedColumn<String>('backlog_staleness_json', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _revisionMeta =
const VerificationMeta('revision');
@override
late final GeneratedColumn<int> revision = GeneratedColumn<int>(
'revision', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _createdAtUtcMeta =
const VerificationMeta('createdAtUtc');
@override
late final GeneratedColumn<DateTime> createdAtUtc = GeneratedColumn<DateTime>(
'created_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
static const VerificationMeta _updatedAtUtcMeta =
const VerificationMeta('updatedAtUtc');
@override
late final GeneratedColumn<DateTime> updatedAtUtc = GeneratedColumn<DateTime>(
'updated_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
@override
List<GeneratedColumn> get $columns => [
ownerId,
timeZoneId,
dayStartMinutes,
dayEndMinutes,
compactMode,
backlogStalenessJson,
revision,
createdAtUtc,
updatedAtUtc
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'settings';
@override
VerificationContext validateIntegrity(Insertable<SettingsRow> instance,
{bool isInserting = false}) {
final context = VerificationContext();
final data = instance.toColumns(true);
if (data.containsKey('owner_id')) {
context.handle(_ownerIdMeta,
ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta));
} else if (isInserting) {
context.missing(_ownerIdMeta);
}
if (data.containsKey('timezone_id')) {
context.handle(
_timeZoneIdMeta,
timeZoneId.isAcceptableOrUnknown(
data['timezone_id']!, _timeZoneIdMeta));
} else if (isInserting) {
context.missing(_timeZoneIdMeta);
}
if (data.containsKey('day_start_minutes')) {
context.handle(
_dayStartMinutesMeta,
dayStartMinutes.isAcceptableOrUnknown(
data['day_start_minutes']!, _dayStartMinutesMeta));
} else if (isInserting) {
context.missing(_dayStartMinutesMeta);
}
if (data.containsKey('day_end_minutes')) {
context.handle(
_dayEndMinutesMeta,
dayEndMinutes.isAcceptableOrUnknown(
data['day_end_minutes']!, _dayEndMinutesMeta));
} else if (isInserting) {
context.missing(_dayEndMinutesMeta);
}
if (data.containsKey('compact_mode')) {
context.handle(
_compactModeMeta,
compactMode.isAcceptableOrUnknown(
data['compact_mode']!, _compactModeMeta));
} else if (isInserting) {
context.missing(_compactModeMeta);
}
if (data.containsKey('backlog_staleness_json')) {
context.handle(
_backlogStalenessJsonMeta,
backlogStalenessJson.isAcceptableOrUnknown(
data['backlog_staleness_json']!, _backlogStalenessJsonMeta));
} else if (isInserting) {
context.missing(_backlogStalenessJsonMeta);
}
if (data.containsKey('revision')) {
context.handle(_revisionMeta,
revision.isAcceptableOrUnknown(data['revision']!, _revisionMeta));
} else if (isInserting) {
context.missing(_revisionMeta);
}
if (data.containsKey('created_at_utc')) {
context.handle(
_createdAtUtcMeta,
createdAtUtc.isAcceptableOrUnknown(
data['created_at_utc']!, _createdAtUtcMeta));
} else if (isInserting) {
context.missing(_createdAtUtcMeta);
}
if (data.containsKey('updated_at_utc')) {
context.handle(
_updatedAtUtcMeta,
updatedAtUtc.isAcceptableOrUnknown(
data['updated_at_utc']!, _updatedAtUtcMeta));
} else if (isInserting) {
context.missing(_updatedAtUtcMeta);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {ownerId};
@override
SettingsRow map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return SettingsRow(
ownerId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,
timeZoneId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}timezone_id'])!,
dayStartMinutes: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}day_start_minutes'])!,
dayEndMinutes: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}day_end_minutes'])!,
compactMode: attachedDatabase.typeMapping
.read(DriftSqlType.bool, data['${effectivePrefix}compact_mode'])!,
backlogStalenessJson: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}backlog_staleness_json'])!,
revision: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}revision'])!,
createdAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}created_at_utc'])!,
updatedAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}updated_at_utc'])!,
);
}
@override
$SettingsTableTable createAlias(String alias) {
return $SettingsTableTable(attachedDatabase, alias);
}
}
class SettingsRow extends DataClass implements Insertable<SettingsRow> {
/// Returns the derived `ownerId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String ownerId;
/// Returns the derived `timeZoneId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String timeZoneId;
/// Returns the derived `dayStartMinutes` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final int dayStartMinutes;
/// Returns the derived `dayEndMinutes` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final int dayEndMinutes;
/// Returns the derived `compactMode` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final bool compactMode;
/// Converts scheduler data for `backlogStalenessJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String backlogStalenessJson;
/// Returns the derived `revision` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final int revision;
/// Returns the derived `createdAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime createdAtUtc;
/// Returns the derived `updatedAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime updatedAtUtc;
const SettingsRow(
{required this.ownerId,
required this.timeZoneId,
required this.dayStartMinutes,
required this.dayEndMinutes,
required this.compactMode,
required this.backlogStalenessJson,
required this.revision,
required this.createdAtUtc,
required this.updatedAtUtc});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['owner_id'] = Variable<String>(ownerId);
map['timezone_id'] = Variable<String>(timeZoneId);
map['day_start_minutes'] = Variable<int>(dayStartMinutes);
map['day_end_minutes'] = Variable<int>(dayEndMinutes);
map['compact_mode'] = Variable<bool>(compactMode);
map['backlog_staleness_json'] = Variable<String>(backlogStalenessJson);
map['revision'] = Variable<int>(revision);
map['created_at_utc'] = Variable<DateTime>(createdAtUtc);
map['updated_at_utc'] = Variable<DateTime>(updatedAtUtc);
return map;
}
SettingsTableCompanion toCompanion(bool nullToAbsent) {
return SettingsTableCompanion(
ownerId: Value(ownerId),
timeZoneId: Value(timeZoneId),
dayStartMinutes: Value(dayStartMinutes),
dayEndMinutes: Value(dayEndMinutes),
compactMode: Value(compactMode),
backlogStalenessJson: Value(backlogStalenessJson),
revision: Value(revision),
createdAtUtc: Value(createdAtUtc),
updatedAtUtc: Value(updatedAtUtc),
);
}
factory SettingsRow.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return SettingsRow(
ownerId: serializer.fromJson<String>(json['ownerId']),
timeZoneId: serializer.fromJson<String>(json['timeZoneId']),
dayStartMinutes: serializer.fromJson<int>(json['dayStartMinutes']),
dayEndMinutes: serializer.fromJson<int>(json['dayEndMinutes']),
compactMode: serializer.fromJson<bool>(json['compactMode']),
backlogStalenessJson:
serializer.fromJson<String>(json['backlogStalenessJson']),
revision: serializer.fromJson<int>(json['revision']),
createdAtUtc: serializer.fromJson<DateTime>(json['createdAtUtc']),
updatedAtUtc: serializer.fromJson<DateTime>(json['updatedAtUtc']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'ownerId': serializer.toJson<String>(ownerId),
'timeZoneId': serializer.toJson<String>(timeZoneId),
'dayStartMinutes': serializer.toJson<int>(dayStartMinutes),
'dayEndMinutes': serializer.toJson<int>(dayEndMinutes),
'compactMode': serializer.toJson<bool>(compactMode),
'backlogStalenessJson': serializer.toJson<String>(backlogStalenessJson),
'revision': serializer.toJson<int>(revision),
'createdAtUtc': serializer.toJson<DateTime>(createdAtUtc),
'updatedAtUtc': serializer.toJson<DateTime>(updatedAtUtc),
};
}
SettingsRow copyWith(
{String? ownerId,
String? timeZoneId,
int? dayStartMinutes,
int? dayEndMinutes,
bool? compactMode,
String? backlogStalenessJson,
int? revision,
DateTime? createdAtUtc,
DateTime? updatedAtUtc}) =>
SettingsRow(
ownerId: ownerId ?? this.ownerId,
timeZoneId: timeZoneId ?? this.timeZoneId,
dayStartMinutes: dayStartMinutes ?? this.dayStartMinutes,
dayEndMinutes: dayEndMinutes ?? this.dayEndMinutes,
compactMode: compactMode ?? this.compactMode,
backlogStalenessJson: backlogStalenessJson ?? this.backlogStalenessJson,
revision: revision ?? this.revision,
createdAtUtc: createdAtUtc ?? this.createdAtUtc,
updatedAtUtc: updatedAtUtc ?? this.updatedAtUtc,
);
SettingsRow copyWithCompanion(SettingsTableCompanion data) {
return SettingsRow(
ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,
timeZoneId:
data.timeZoneId.present ? data.timeZoneId.value : this.timeZoneId,
dayStartMinutes: data.dayStartMinutes.present
? data.dayStartMinutes.value
: this.dayStartMinutes,
dayEndMinutes: data.dayEndMinutes.present
? data.dayEndMinutes.value
: this.dayEndMinutes,
compactMode:
data.compactMode.present ? data.compactMode.value : this.compactMode,
backlogStalenessJson: data.backlogStalenessJson.present
? data.backlogStalenessJson.value
: this.backlogStalenessJson,
revision: data.revision.present ? data.revision.value : this.revision,
createdAtUtc: data.createdAtUtc.present
? data.createdAtUtc.value
: this.createdAtUtc,
updatedAtUtc: data.updatedAtUtc.present
? data.updatedAtUtc.value
: this.updatedAtUtc,
);
}
@override
String toString() {
return (StringBuffer('SettingsRow(')
..write('ownerId: $ownerId, ')
..write('timeZoneId: $timeZoneId, ')
..write('dayStartMinutes: $dayStartMinutes, ')
..write('dayEndMinutes: $dayEndMinutes, ')
..write('compactMode: $compactMode, ')
..write('backlogStalenessJson: $backlogStalenessJson, ')
..write('revision: $revision, ')
..write('createdAtUtc: $createdAtUtc, ')
..write('updatedAtUtc: $updatedAtUtc')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(
ownerId,
timeZoneId,
dayStartMinutes,
dayEndMinutes,
compactMode,
backlogStalenessJson,
revision,
createdAtUtc,
updatedAtUtc);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is SettingsRow &&
other.ownerId == this.ownerId &&
other.timeZoneId == this.timeZoneId &&
other.dayStartMinutes == this.dayStartMinutes &&
other.dayEndMinutes == this.dayEndMinutes &&
other.compactMode == this.compactMode &&
other.backlogStalenessJson == this.backlogStalenessJson &&
other.revision == this.revision &&
other.createdAtUtc == this.createdAtUtc &&
other.updatedAtUtc == this.updatedAtUtc);
}
class SettingsTableCompanion extends UpdateCompanion<SettingsRow> {
final Value<String> ownerId;
final Value<String> timeZoneId;
final Value<int> dayStartMinutes;
final Value<int> dayEndMinutes;
final Value<bool> compactMode;
final Value<String> backlogStalenessJson;
final Value<int> revision;
final Value<DateTime> createdAtUtc;
final Value<DateTime> updatedAtUtc;
final Value<int> rowid;
const SettingsTableCompanion({
this.ownerId = const Value.absent(),
this.timeZoneId = const Value.absent(),
this.dayStartMinutes = const Value.absent(),
this.dayEndMinutes = const Value.absent(),
this.compactMode = const Value.absent(),
this.backlogStalenessJson = const Value.absent(),
this.revision = const Value.absent(),
this.createdAtUtc = const Value.absent(),
this.updatedAtUtc = const Value.absent(),
this.rowid = const Value.absent(),
});
SettingsTableCompanion.insert({
required String ownerId,
required String timeZoneId,
required int dayStartMinutes,
required int dayEndMinutes,
required bool compactMode,
required String backlogStalenessJson,
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
this.rowid = const Value.absent(),
}) : ownerId = Value(ownerId),
timeZoneId = Value(timeZoneId),
dayStartMinutes = Value(dayStartMinutes),
dayEndMinutes = Value(dayEndMinutes),
compactMode = Value(compactMode),
backlogStalenessJson = Value(backlogStalenessJson),
revision = Value(revision),
createdAtUtc = Value(createdAtUtc),
updatedAtUtc = Value(updatedAtUtc);
static Insertable<SettingsRow> custom({
Expression<String>? ownerId,
Expression<String>? timeZoneId,
Expression<int>? dayStartMinutes,
Expression<int>? dayEndMinutes,
Expression<bool>? compactMode,
Expression<String>? backlogStalenessJson,
Expression<int>? revision,
Expression<DateTime>? createdAtUtc,
Expression<DateTime>? updatedAtUtc,
Expression<int>? rowid,
}) {
return RawValuesInsertable({
if (ownerId != null) 'owner_id': ownerId,
if (timeZoneId != null) 'timezone_id': timeZoneId,
if (dayStartMinutes != null) 'day_start_minutes': dayStartMinutes,
if (dayEndMinutes != null) 'day_end_minutes': dayEndMinutes,
if (compactMode != null) 'compact_mode': compactMode,
if (backlogStalenessJson != null)
'backlog_staleness_json': backlogStalenessJson,
if (revision != null) 'revision': revision,
if (createdAtUtc != null) 'created_at_utc': createdAtUtc,
if (updatedAtUtc != null) 'updated_at_utc': updatedAtUtc,
if (rowid != null) 'rowid': rowid,
});
}
SettingsTableCompanion copyWith(
{Value<String>? ownerId,
Value<String>? timeZoneId,
Value<int>? dayStartMinutes,
Value<int>? dayEndMinutes,
Value<bool>? compactMode,
Value<String>? backlogStalenessJson,
Value<int>? revision,
Value<DateTime>? createdAtUtc,
Value<DateTime>? updatedAtUtc,
Value<int>? rowid}) {
return SettingsTableCompanion(
ownerId: ownerId ?? this.ownerId,
timeZoneId: timeZoneId ?? this.timeZoneId,
dayStartMinutes: dayStartMinutes ?? this.dayStartMinutes,
dayEndMinutes: dayEndMinutes ?? this.dayEndMinutes,
compactMode: compactMode ?? this.compactMode,
backlogStalenessJson: backlogStalenessJson ?? this.backlogStalenessJson,
revision: revision ?? this.revision,
createdAtUtc: createdAtUtc ?? this.createdAtUtc,
updatedAtUtc: updatedAtUtc ?? this.updatedAtUtc,
rowid: rowid ?? this.rowid,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (ownerId.present) {
map['owner_id'] = Variable<String>(ownerId.value);
}
if (timeZoneId.present) {
map['timezone_id'] = Variable<String>(timeZoneId.value);
}
if (dayStartMinutes.present) {
map['day_start_minutes'] = Variable<int>(dayStartMinutes.value);
}
if (dayEndMinutes.present) {
map['day_end_minutes'] = Variable<int>(dayEndMinutes.value);
}
if (compactMode.present) {
map['compact_mode'] = Variable<bool>(compactMode.value);
}
if (backlogStalenessJson.present) {
map['backlog_staleness_json'] =
Variable<String>(backlogStalenessJson.value);
}
if (revision.present) {
map['revision'] = Variable<int>(revision.value);
}
if (createdAtUtc.present) {
map['created_at_utc'] = Variable<DateTime>(createdAtUtc.value);
}
if (updatedAtUtc.present) {
map['updated_at_utc'] = Variable<DateTime>(updatedAtUtc.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(rowid.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('SettingsTableCompanion(')
..write('ownerId: $ownerId, ')
..write('timeZoneId: $timeZoneId, ')
..write('dayStartMinutes: $dayStartMinutes, ')
..write('dayEndMinutes: $dayEndMinutes, ')
..write('compactMode: $compactMode, ')
..write('backlogStalenessJson: $backlogStalenessJson, ')
..write('revision: $revision, ')
..write('createdAtUtc: $createdAtUtc, ')
..write('updatedAtUtc: $updatedAtUtc, ')
..write('rowid: $rowid')
..write(')'))
.toString();
}
}
class $SnapshotsTable extends Snapshots
with TableInfo<$SnapshotsTable, SnapshotRow> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$SnapshotsTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _idMeta = const VerificationMeta('id');
@override
late final GeneratedColumn<String> id = GeneratedColumn<String>(
'id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _ownerIdMeta =
const VerificationMeta('ownerId');
@override
late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(
'owner_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _capturedAtUtcMeta =
const VerificationMeta('capturedAtUtc');
@override
late final GeneratedColumn<DateTime> capturedAtUtc =
GeneratedColumn<DateTime>('captured_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
static const VerificationMeta _operationNameMeta =
const VerificationMeta('operationName');
@override
late final GeneratedColumn<String> operationName = GeneratedColumn<String>(
'operation_name', aliasedName, true,
type: DriftSqlType.string, requiredDuringInsert: false);
static const VerificationMeta _sourceDateMeta =
const VerificationMeta('sourceDate');
@override
late final GeneratedColumn<String> sourceDate = GeneratedColumn<String>(
'source_date', aliasedName, true,
type: DriftSqlType.string, requiredDuringInsert: false);
static const VerificationMeta _targetDateMeta =
const VerificationMeta('targetDate');
@override
late final GeneratedColumn<String> targetDate = GeneratedColumn<String>(
'target_date', aliasedName, true,
type: DriftSqlType.string, requiredDuringInsert: false);
static const VerificationMeta _windowJsonMeta =
const VerificationMeta('windowJson');
@override
late final GeneratedColumn<String> windowJson = GeneratedColumn<String>(
'window_json', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _tasksJsonMeta =
const VerificationMeta('tasksJson');
@override
late final GeneratedColumn<String> tasksJson = GeneratedColumn<String>(
'tasks_json', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _lockedIntervalsJsonMeta =
const VerificationMeta('lockedIntervalsJson');
@override
late final GeneratedColumn<String> lockedIntervalsJson =
GeneratedColumn<String>('locked_intervals_json', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _requiredVisibleIntervalsJsonMeta =
const VerificationMeta('requiredVisibleIntervalsJson');
@override
late final GeneratedColumn<String> requiredVisibleIntervalsJson =
GeneratedColumn<String>(
'required_visible_intervals_json', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _noticesJsonMeta =
const VerificationMeta('noticesJson');
@override
late final GeneratedColumn<String> noticesJson = GeneratedColumn<String>(
'notices_json', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _changesJsonMeta =
const VerificationMeta('changesJson');
@override
late final GeneratedColumn<String> changesJson = GeneratedColumn<String>(
'changes_json', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _overlapsJsonMeta =
const VerificationMeta('overlapsJson');
@override
late final GeneratedColumn<String> overlapsJson = GeneratedColumn<String>(
'overlaps_json', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _retentionExpiresUtcMeta =
const VerificationMeta('retentionExpiresUtc');
@override
late final GeneratedColumn<DateTime> retentionExpiresUtc =
GeneratedColumn<DateTime>('retention_expires_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
static const VerificationMeta _truncatedMeta =
const VerificationMeta('truncated');
@override
late final GeneratedColumn<bool> truncated = GeneratedColumn<bool>(
'truncated', aliasedName, false,
type: DriftSqlType.bool,
requiredDuringInsert: true,
defaultConstraints:
GeneratedColumn.constraintIsAlways('CHECK ("truncated" IN (0, 1))'));
static const VerificationMeta _revisionMeta =
const VerificationMeta('revision');
@override
late final GeneratedColumn<int> revision = GeneratedColumn<int>(
'revision', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _createdAtUtcMeta =
const VerificationMeta('createdAtUtc');
@override
late final GeneratedColumn<DateTime> createdAtUtc = GeneratedColumn<DateTime>(
'created_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
static const VerificationMeta _updatedAtUtcMeta =
const VerificationMeta('updatedAtUtc');
@override
late final GeneratedColumn<DateTime> updatedAtUtc = GeneratedColumn<DateTime>(
'updated_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
@override
List<GeneratedColumn> get $columns => [
id,
ownerId,
capturedAtUtc,
operationName,
sourceDate,
targetDate,
windowJson,
tasksJson,
lockedIntervalsJson,
requiredVisibleIntervalsJson,
noticesJson,
changesJson,
overlapsJson,
retentionExpiresUtc,
truncated,
revision,
createdAtUtc,
updatedAtUtc
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'snapshots';
@override
VerificationContext validateIntegrity(Insertable<SnapshotRow> instance,
{bool isInserting = false}) {
final context = VerificationContext();
final data = instance.toColumns(true);
if (data.containsKey('id')) {
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
} else if (isInserting) {
context.missing(_idMeta);
}
if (data.containsKey('owner_id')) {
context.handle(_ownerIdMeta,
ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta));
} else if (isInserting) {
context.missing(_ownerIdMeta);
}
if (data.containsKey('captured_at_utc')) {
context.handle(
_capturedAtUtcMeta,
capturedAtUtc.isAcceptableOrUnknown(
data['captured_at_utc']!, _capturedAtUtcMeta));
} else if (isInserting) {
context.missing(_capturedAtUtcMeta);
}
if (data.containsKey('operation_name')) {
context.handle(
_operationNameMeta,
operationName.isAcceptableOrUnknown(
data['operation_name']!, _operationNameMeta));
}
if (data.containsKey('source_date')) {
context.handle(
_sourceDateMeta,
sourceDate.isAcceptableOrUnknown(
data['source_date']!, _sourceDateMeta));
}
if (data.containsKey('target_date')) {
context.handle(
_targetDateMeta,
targetDate.isAcceptableOrUnknown(
data['target_date']!, _targetDateMeta));
}
if (data.containsKey('window_json')) {
context.handle(
_windowJsonMeta,
windowJson.isAcceptableOrUnknown(
data['window_json']!, _windowJsonMeta));
} else if (isInserting) {
context.missing(_windowJsonMeta);
}
if (data.containsKey('tasks_json')) {
context.handle(_tasksJsonMeta,
tasksJson.isAcceptableOrUnknown(data['tasks_json']!, _tasksJsonMeta));
} else if (isInserting) {
context.missing(_tasksJsonMeta);
}
if (data.containsKey('locked_intervals_json')) {
context.handle(
_lockedIntervalsJsonMeta,
lockedIntervalsJson.isAcceptableOrUnknown(
data['locked_intervals_json']!, _lockedIntervalsJsonMeta));
} else if (isInserting) {
context.missing(_lockedIntervalsJsonMeta);
}
if (data.containsKey('required_visible_intervals_json')) {
context.handle(
_requiredVisibleIntervalsJsonMeta,
requiredVisibleIntervalsJson.isAcceptableOrUnknown(
data['required_visible_intervals_json']!,
_requiredVisibleIntervalsJsonMeta));
} else if (isInserting) {
context.missing(_requiredVisibleIntervalsJsonMeta);
}
if (data.containsKey('notices_json')) {
context.handle(
_noticesJsonMeta,
noticesJson.isAcceptableOrUnknown(
data['notices_json']!, _noticesJsonMeta));
} else if (isInserting) {
context.missing(_noticesJsonMeta);
}
if (data.containsKey('changes_json')) {
context.handle(
_changesJsonMeta,
changesJson.isAcceptableOrUnknown(
data['changes_json']!, _changesJsonMeta));
} else if (isInserting) {
context.missing(_changesJsonMeta);
}
if (data.containsKey('overlaps_json')) {
context.handle(
_overlapsJsonMeta,
overlapsJson.isAcceptableOrUnknown(
data['overlaps_json']!, _overlapsJsonMeta));
} else if (isInserting) {
context.missing(_overlapsJsonMeta);
}
if (data.containsKey('retention_expires_utc')) {
context.handle(
_retentionExpiresUtcMeta,
retentionExpiresUtc.isAcceptableOrUnknown(
data['retention_expires_utc']!, _retentionExpiresUtcMeta));
} else if (isInserting) {
context.missing(_retentionExpiresUtcMeta);
}
if (data.containsKey('truncated')) {
context.handle(_truncatedMeta,
truncated.isAcceptableOrUnknown(data['truncated']!, _truncatedMeta));
} else if (isInserting) {
context.missing(_truncatedMeta);
}
if (data.containsKey('revision')) {
context.handle(_revisionMeta,
revision.isAcceptableOrUnknown(data['revision']!, _revisionMeta));
} else if (isInserting) {
context.missing(_revisionMeta);
}
if (data.containsKey('created_at_utc')) {
context.handle(
_createdAtUtcMeta,
createdAtUtc.isAcceptableOrUnknown(
data['created_at_utc']!, _createdAtUtcMeta));
} else if (isInserting) {
context.missing(_createdAtUtcMeta);
}
if (data.containsKey('updated_at_utc')) {
context.handle(
_updatedAtUtcMeta,
updatedAtUtc.isAcceptableOrUnknown(
data['updated_at_utc']!, _updatedAtUtcMeta));
} else if (isInserting) {
context.missing(_updatedAtUtcMeta);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {id};
@override
SnapshotRow map(Map<String, dynamic> data, {String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return SnapshotRow(
id: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}id'])!,
ownerId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,
capturedAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}captured_at_utc'])!,
operationName: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}operation_name']),
sourceDate: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}source_date']),
targetDate: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}target_date']),
windowJson: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}window_json'])!,
tasksJson: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}tasks_json'])!,
lockedIntervalsJson: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}locked_intervals_json'])!,
requiredVisibleIntervalsJson: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}required_visible_intervals_json'])!,
noticesJson: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}notices_json'])!,
changesJson: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}changes_json'])!,
overlapsJson: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}overlaps_json'])!,
retentionExpiresUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}retention_expires_utc'])!,
truncated: attachedDatabase.typeMapping
.read(DriftSqlType.bool, data['${effectivePrefix}truncated'])!,
revision: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}revision'])!,
createdAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}created_at_utc'])!,
updatedAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}updated_at_utc'])!,
);
}
@override
$SnapshotsTable createAlias(String alias) {
return $SnapshotsTable(attachedDatabase, alias);
}
}
class SnapshotRow extends DataClass implements Insertable<SnapshotRow> {
/// Returns the derived `id` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String id;
/// Returns the derived `ownerId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String ownerId;
/// Returns the derived `capturedAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime capturedAtUtc;
/// Returns the derived `operationName` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String? operationName;
/// Returns the derived `sourceDate` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String? sourceDate;
/// Returns the derived `targetDate` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String? targetDate;
/// Converts scheduler data for `windowJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String windowJson;
/// Converts scheduler data for `tasksJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String tasksJson;
/// Converts scheduler data for `lockedIntervalsJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String lockedIntervalsJson;
/// Converts scheduler data for `requiredVisibleIntervalsJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String requiredVisibleIntervalsJson;
/// Converts scheduler data for `noticesJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String noticesJson;
/// Converts scheduler data for `changesJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String changesJson;
/// Converts scheduler data for `overlapsJson` without changing the source object.
/// Conversion helpers keep persistence and export shapes explicit so domain models do not depend on storage-specific details.
final String overlapsJson;
/// Returns the derived `retentionExpiresUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime retentionExpiresUtc;
/// Returns the derived `truncated` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final bool truncated;
/// Returns the derived `revision` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final int revision;
/// Returns the derived `createdAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime createdAtUtc;
/// Returns the derived `updatedAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime updatedAtUtc;
const SnapshotRow(
{required this.id,
required this.ownerId,
required this.capturedAtUtc,
this.operationName,
this.sourceDate,
this.targetDate,
required this.windowJson,
required this.tasksJson,
required this.lockedIntervalsJson,
required this.requiredVisibleIntervalsJson,
required this.noticesJson,
required this.changesJson,
required this.overlapsJson,
required this.retentionExpiresUtc,
required this.truncated,
required this.revision,
required this.createdAtUtc,
required this.updatedAtUtc});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['id'] = Variable<String>(id);
map['owner_id'] = Variable<String>(ownerId);
map['captured_at_utc'] = Variable<DateTime>(capturedAtUtc);
if (!nullToAbsent || operationName != null) {
map['operation_name'] = Variable<String>(operationName);
}
if (!nullToAbsent || sourceDate != null) {
map['source_date'] = Variable<String>(sourceDate);
}
if (!nullToAbsent || targetDate != null) {
map['target_date'] = Variable<String>(targetDate);
}
map['window_json'] = Variable<String>(windowJson);
map['tasks_json'] = Variable<String>(tasksJson);
map['locked_intervals_json'] = Variable<String>(lockedIntervalsJson);
map['required_visible_intervals_json'] =
Variable<String>(requiredVisibleIntervalsJson);
map['notices_json'] = Variable<String>(noticesJson);
map['changes_json'] = Variable<String>(changesJson);
map['overlaps_json'] = Variable<String>(overlapsJson);
map['retention_expires_utc'] = Variable<DateTime>(retentionExpiresUtc);
map['truncated'] = Variable<bool>(truncated);
map['revision'] = Variable<int>(revision);
map['created_at_utc'] = Variable<DateTime>(createdAtUtc);
map['updated_at_utc'] = Variable<DateTime>(updatedAtUtc);
return map;
}
SnapshotsCompanion toCompanion(bool nullToAbsent) {
return SnapshotsCompanion(
id: Value(id),
ownerId: Value(ownerId),
capturedAtUtc: Value(capturedAtUtc),
operationName: operationName == null && nullToAbsent
? const Value.absent()
: Value(operationName),
sourceDate: sourceDate == null && nullToAbsent
? const Value.absent()
: Value(sourceDate),
targetDate: targetDate == null && nullToAbsent
? const Value.absent()
: Value(targetDate),
windowJson: Value(windowJson),
tasksJson: Value(tasksJson),
lockedIntervalsJson: Value(lockedIntervalsJson),
requiredVisibleIntervalsJson: Value(requiredVisibleIntervalsJson),
noticesJson: Value(noticesJson),
changesJson: Value(changesJson),
overlapsJson: Value(overlapsJson),
retentionExpiresUtc: Value(retentionExpiresUtc),
truncated: Value(truncated),
revision: Value(revision),
createdAtUtc: Value(createdAtUtc),
updatedAtUtc: Value(updatedAtUtc),
);
}
factory SnapshotRow.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return SnapshotRow(
id: serializer.fromJson<String>(json['id']),
ownerId: serializer.fromJson<String>(json['ownerId']),
capturedAtUtc: serializer.fromJson<DateTime>(json['capturedAtUtc']),
operationName: serializer.fromJson<String?>(json['operationName']),
sourceDate: serializer.fromJson<String?>(json['sourceDate']),
targetDate: serializer.fromJson<String?>(json['targetDate']),
windowJson: serializer.fromJson<String>(json['windowJson']),
tasksJson: serializer.fromJson<String>(json['tasksJson']),
lockedIntervalsJson:
serializer.fromJson<String>(json['lockedIntervalsJson']),
requiredVisibleIntervalsJson:
serializer.fromJson<String>(json['requiredVisibleIntervalsJson']),
noticesJson: serializer.fromJson<String>(json['noticesJson']),
changesJson: serializer.fromJson<String>(json['changesJson']),
overlapsJson: serializer.fromJson<String>(json['overlapsJson']),
retentionExpiresUtc:
serializer.fromJson<DateTime>(json['retentionExpiresUtc']),
truncated: serializer.fromJson<bool>(json['truncated']),
revision: serializer.fromJson<int>(json['revision']),
createdAtUtc: serializer.fromJson<DateTime>(json['createdAtUtc']),
updatedAtUtc: serializer.fromJson<DateTime>(json['updatedAtUtc']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'id': serializer.toJson<String>(id),
'ownerId': serializer.toJson<String>(ownerId),
'capturedAtUtc': serializer.toJson<DateTime>(capturedAtUtc),
'operationName': serializer.toJson<String?>(operationName),
'sourceDate': serializer.toJson<String?>(sourceDate),
'targetDate': serializer.toJson<String?>(targetDate),
'windowJson': serializer.toJson<String>(windowJson),
'tasksJson': serializer.toJson<String>(tasksJson),
'lockedIntervalsJson': serializer.toJson<String>(lockedIntervalsJson),
'requiredVisibleIntervalsJson':
serializer.toJson<String>(requiredVisibleIntervalsJson),
'noticesJson': serializer.toJson<String>(noticesJson),
'changesJson': serializer.toJson<String>(changesJson),
'overlapsJson': serializer.toJson<String>(overlapsJson),
'retentionExpiresUtc': serializer.toJson<DateTime>(retentionExpiresUtc),
'truncated': serializer.toJson<bool>(truncated),
'revision': serializer.toJson<int>(revision),
'createdAtUtc': serializer.toJson<DateTime>(createdAtUtc),
'updatedAtUtc': serializer.toJson<DateTime>(updatedAtUtc),
};
}
SnapshotRow copyWith(
{String? id,
String? ownerId,
DateTime? capturedAtUtc,
Value<String?> operationName = const Value.absent(),
Value<String?> sourceDate = const Value.absent(),
Value<String?> targetDate = const Value.absent(),
String? windowJson,
String? tasksJson,
String? lockedIntervalsJson,
String? requiredVisibleIntervalsJson,
String? noticesJson,
String? changesJson,
String? overlapsJson,
DateTime? retentionExpiresUtc,
bool? truncated,
int? revision,
DateTime? createdAtUtc,
DateTime? updatedAtUtc}) =>
SnapshotRow(
id: id ?? this.id,
ownerId: ownerId ?? this.ownerId,
capturedAtUtc: capturedAtUtc ?? this.capturedAtUtc,
operationName:
operationName.present ? operationName.value : this.operationName,
sourceDate: sourceDate.present ? sourceDate.value : this.sourceDate,
targetDate: targetDate.present ? targetDate.value : this.targetDate,
windowJson: windowJson ?? this.windowJson,
tasksJson: tasksJson ?? this.tasksJson,
lockedIntervalsJson: lockedIntervalsJson ?? this.lockedIntervalsJson,
requiredVisibleIntervalsJson:
requiredVisibleIntervalsJson ?? this.requiredVisibleIntervalsJson,
noticesJson: noticesJson ?? this.noticesJson,
changesJson: changesJson ?? this.changesJson,
overlapsJson: overlapsJson ?? this.overlapsJson,
retentionExpiresUtc: retentionExpiresUtc ?? this.retentionExpiresUtc,
truncated: truncated ?? this.truncated,
revision: revision ?? this.revision,
createdAtUtc: createdAtUtc ?? this.createdAtUtc,
updatedAtUtc: updatedAtUtc ?? this.updatedAtUtc,
);
SnapshotRow copyWithCompanion(SnapshotsCompanion data) {
return SnapshotRow(
id: data.id.present ? data.id.value : this.id,
ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,
capturedAtUtc: data.capturedAtUtc.present
? data.capturedAtUtc.value
: this.capturedAtUtc,
operationName: data.operationName.present
? data.operationName.value
: this.operationName,
sourceDate:
data.sourceDate.present ? data.sourceDate.value : this.sourceDate,
targetDate:
data.targetDate.present ? data.targetDate.value : this.targetDate,
windowJson:
data.windowJson.present ? data.windowJson.value : this.windowJson,
tasksJson: data.tasksJson.present ? data.tasksJson.value : this.tasksJson,
lockedIntervalsJson: data.lockedIntervalsJson.present
? data.lockedIntervalsJson.value
: this.lockedIntervalsJson,
requiredVisibleIntervalsJson: data.requiredVisibleIntervalsJson.present
? data.requiredVisibleIntervalsJson.value
: this.requiredVisibleIntervalsJson,
noticesJson:
data.noticesJson.present ? data.noticesJson.value : this.noticesJson,
changesJson:
data.changesJson.present ? data.changesJson.value : this.changesJson,
overlapsJson: data.overlapsJson.present
? data.overlapsJson.value
: this.overlapsJson,
retentionExpiresUtc: data.retentionExpiresUtc.present
? data.retentionExpiresUtc.value
: this.retentionExpiresUtc,
truncated: data.truncated.present ? data.truncated.value : this.truncated,
revision: data.revision.present ? data.revision.value : this.revision,
createdAtUtc: data.createdAtUtc.present
? data.createdAtUtc.value
: this.createdAtUtc,
updatedAtUtc: data.updatedAtUtc.present
? data.updatedAtUtc.value
: this.updatedAtUtc,
);
}
@override
String toString() {
return (StringBuffer('SnapshotRow(')
..write('id: $id, ')
..write('ownerId: $ownerId, ')
..write('capturedAtUtc: $capturedAtUtc, ')
..write('operationName: $operationName, ')
..write('sourceDate: $sourceDate, ')
..write('targetDate: $targetDate, ')
..write('windowJson: $windowJson, ')
..write('tasksJson: $tasksJson, ')
..write('lockedIntervalsJson: $lockedIntervalsJson, ')
..write(
'requiredVisibleIntervalsJson: $requiredVisibleIntervalsJson, ')
..write('noticesJson: $noticesJson, ')
..write('changesJson: $changesJson, ')
..write('overlapsJson: $overlapsJson, ')
..write('retentionExpiresUtc: $retentionExpiresUtc, ')
..write('truncated: $truncated, ')
..write('revision: $revision, ')
..write('createdAtUtc: $createdAtUtc, ')
..write('updatedAtUtc: $updatedAtUtc')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(
id,
ownerId,
capturedAtUtc,
operationName,
sourceDate,
targetDate,
windowJson,
tasksJson,
lockedIntervalsJson,
requiredVisibleIntervalsJson,
noticesJson,
changesJson,
overlapsJson,
retentionExpiresUtc,
truncated,
revision,
createdAtUtc,
updatedAtUtc);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is SnapshotRow &&
other.id == this.id &&
other.ownerId == this.ownerId &&
other.capturedAtUtc == this.capturedAtUtc &&
other.operationName == this.operationName &&
other.sourceDate == this.sourceDate &&
other.targetDate == this.targetDate &&
other.windowJson == this.windowJson &&
other.tasksJson == this.tasksJson &&
other.lockedIntervalsJson == this.lockedIntervalsJson &&
other.requiredVisibleIntervalsJson ==
this.requiredVisibleIntervalsJson &&
other.noticesJson == this.noticesJson &&
other.changesJson == this.changesJson &&
other.overlapsJson == this.overlapsJson &&
other.retentionExpiresUtc == this.retentionExpiresUtc &&
other.truncated == this.truncated &&
other.revision == this.revision &&
other.createdAtUtc == this.createdAtUtc &&
other.updatedAtUtc == this.updatedAtUtc);
}
class SnapshotsCompanion extends UpdateCompanion<SnapshotRow> {
final Value<String> id;
final Value<String> ownerId;
final Value<DateTime> capturedAtUtc;
final Value<String?> operationName;
final Value<String?> sourceDate;
final Value<String?> targetDate;
final Value<String> windowJson;
final Value<String> tasksJson;
final Value<String> lockedIntervalsJson;
final Value<String> requiredVisibleIntervalsJson;
final Value<String> noticesJson;
final Value<String> changesJson;
final Value<String> overlapsJson;
final Value<DateTime> retentionExpiresUtc;
final Value<bool> truncated;
final Value<int> revision;
final Value<DateTime> createdAtUtc;
final Value<DateTime> updatedAtUtc;
final Value<int> rowid;
const SnapshotsCompanion({
this.id = const Value.absent(),
this.ownerId = const Value.absent(),
this.capturedAtUtc = const Value.absent(),
this.operationName = const Value.absent(),
this.sourceDate = const Value.absent(),
this.targetDate = const Value.absent(),
this.windowJson = const Value.absent(),
this.tasksJson = const Value.absent(),
this.lockedIntervalsJson = const Value.absent(),
this.requiredVisibleIntervalsJson = const Value.absent(),
this.noticesJson = const Value.absent(),
this.changesJson = const Value.absent(),
this.overlapsJson = const Value.absent(),
this.retentionExpiresUtc = const Value.absent(),
this.truncated = const Value.absent(),
this.revision = const Value.absent(),
this.createdAtUtc = const Value.absent(),
this.updatedAtUtc = const Value.absent(),
this.rowid = const Value.absent(),
});
SnapshotsCompanion.insert({
required String id,
required String ownerId,
required DateTime capturedAtUtc,
this.operationName = const Value.absent(),
this.sourceDate = const Value.absent(),
this.targetDate = const Value.absent(),
required String windowJson,
required String tasksJson,
required String lockedIntervalsJson,
required String requiredVisibleIntervalsJson,
required String noticesJson,
required String changesJson,
required String overlapsJson,
required DateTime retentionExpiresUtc,
required bool truncated,
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
this.rowid = const Value.absent(),
}) : id = Value(id),
ownerId = Value(ownerId),
capturedAtUtc = Value(capturedAtUtc),
windowJson = Value(windowJson),
tasksJson = Value(tasksJson),
lockedIntervalsJson = Value(lockedIntervalsJson),
requiredVisibleIntervalsJson = Value(requiredVisibleIntervalsJson),
noticesJson = Value(noticesJson),
changesJson = Value(changesJson),
overlapsJson = Value(overlapsJson),
retentionExpiresUtc = Value(retentionExpiresUtc),
truncated = Value(truncated),
revision = Value(revision),
createdAtUtc = Value(createdAtUtc),
updatedAtUtc = Value(updatedAtUtc);
static Insertable<SnapshotRow> custom({
Expression<String>? id,
Expression<String>? ownerId,
Expression<DateTime>? capturedAtUtc,
Expression<String>? operationName,
Expression<String>? sourceDate,
Expression<String>? targetDate,
Expression<String>? windowJson,
Expression<String>? tasksJson,
Expression<String>? lockedIntervalsJson,
Expression<String>? requiredVisibleIntervalsJson,
Expression<String>? noticesJson,
Expression<String>? changesJson,
Expression<String>? overlapsJson,
Expression<DateTime>? retentionExpiresUtc,
Expression<bool>? truncated,
Expression<int>? revision,
Expression<DateTime>? createdAtUtc,
Expression<DateTime>? updatedAtUtc,
Expression<int>? rowid,
}) {
return RawValuesInsertable({
if (id != null) 'id': id,
if (ownerId != null) 'owner_id': ownerId,
if (capturedAtUtc != null) 'captured_at_utc': capturedAtUtc,
if (operationName != null) 'operation_name': operationName,
if (sourceDate != null) 'source_date': sourceDate,
if (targetDate != null) 'target_date': targetDate,
if (windowJson != null) 'window_json': windowJson,
if (tasksJson != null) 'tasks_json': tasksJson,
if (lockedIntervalsJson != null)
'locked_intervals_json': lockedIntervalsJson,
if (requiredVisibleIntervalsJson != null)
'required_visible_intervals_json': requiredVisibleIntervalsJson,
if (noticesJson != null) 'notices_json': noticesJson,
if (changesJson != null) 'changes_json': changesJson,
if (overlapsJson != null) 'overlaps_json': overlapsJson,
if (retentionExpiresUtc != null)
'retention_expires_utc': retentionExpiresUtc,
if (truncated != null) 'truncated': truncated,
if (revision != null) 'revision': revision,
if (createdAtUtc != null) 'created_at_utc': createdAtUtc,
if (updatedAtUtc != null) 'updated_at_utc': updatedAtUtc,
if (rowid != null) 'rowid': rowid,
});
}
SnapshotsCompanion copyWith(
{Value<String>? id,
Value<String>? ownerId,
Value<DateTime>? capturedAtUtc,
Value<String?>? operationName,
Value<String?>? sourceDate,
Value<String?>? targetDate,
Value<String>? windowJson,
Value<String>? tasksJson,
Value<String>? lockedIntervalsJson,
Value<String>? requiredVisibleIntervalsJson,
Value<String>? noticesJson,
Value<String>? changesJson,
Value<String>? overlapsJson,
Value<DateTime>? retentionExpiresUtc,
Value<bool>? truncated,
Value<int>? revision,
Value<DateTime>? createdAtUtc,
Value<DateTime>? updatedAtUtc,
Value<int>? rowid}) {
return SnapshotsCompanion(
id: id ?? this.id,
ownerId: ownerId ?? this.ownerId,
capturedAtUtc: capturedAtUtc ?? this.capturedAtUtc,
operationName: operationName ?? this.operationName,
sourceDate: sourceDate ?? this.sourceDate,
targetDate: targetDate ?? this.targetDate,
windowJson: windowJson ?? this.windowJson,
tasksJson: tasksJson ?? this.tasksJson,
lockedIntervalsJson: lockedIntervalsJson ?? this.lockedIntervalsJson,
requiredVisibleIntervalsJson:
requiredVisibleIntervalsJson ?? this.requiredVisibleIntervalsJson,
noticesJson: noticesJson ?? this.noticesJson,
changesJson: changesJson ?? this.changesJson,
overlapsJson: overlapsJson ?? this.overlapsJson,
retentionExpiresUtc: retentionExpiresUtc ?? this.retentionExpiresUtc,
truncated: truncated ?? this.truncated,
revision: revision ?? this.revision,
createdAtUtc: createdAtUtc ?? this.createdAtUtc,
updatedAtUtc: updatedAtUtc ?? this.updatedAtUtc,
rowid: rowid ?? this.rowid,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (id.present) {
map['id'] = Variable<String>(id.value);
}
if (ownerId.present) {
map['owner_id'] = Variable<String>(ownerId.value);
}
if (capturedAtUtc.present) {
map['captured_at_utc'] = Variable<DateTime>(capturedAtUtc.value);
}
if (operationName.present) {
map['operation_name'] = Variable<String>(operationName.value);
}
if (sourceDate.present) {
map['source_date'] = Variable<String>(sourceDate.value);
}
if (targetDate.present) {
map['target_date'] = Variable<String>(targetDate.value);
}
if (windowJson.present) {
map['window_json'] = Variable<String>(windowJson.value);
}
if (tasksJson.present) {
map['tasks_json'] = Variable<String>(tasksJson.value);
}
if (lockedIntervalsJson.present) {
map['locked_intervals_json'] =
Variable<String>(lockedIntervalsJson.value);
}
if (requiredVisibleIntervalsJson.present) {
map['required_visible_intervals_json'] =
Variable<String>(requiredVisibleIntervalsJson.value);
}
if (noticesJson.present) {
map['notices_json'] = Variable<String>(noticesJson.value);
}
if (changesJson.present) {
map['changes_json'] = Variable<String>(changesJson.value);
}
if (overlapsJson.present) {
map['overlaps_json'] = Variable<String>(overlapsJson.value);
}
if (retentionExpiresUtc.present) {
map['retention_expires_utc'] =
Variable<DateTime>(retentionExpiresUtc.value);
}
if (truncated.present) {
map['truncated'] = Variable<bool>(truncated.value);
}
if (revision.present) {
map['revision'] = Variable<int>(revision.value);
}
if (createdAtUtc.present) {
map['created_at_utc'] = Variable<DateTime>(createdAtUtc.value);
}
if (updatedAtUtc.present) {
map['updated_at_utc'] = Variable<DateTime>(updatedAtUtc.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(rowid.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('SnapshotsCompanion(')
..write('id: $id, ')
..write('ownerId: $ownerId, ')
..write('capturedAtUtc: $capturedAtUtc, ')
..write('operationName: $operationName, ')
..write('sourceDate: $sourceDate, ')
..write('targetDate: $targetDate, ')
..write('windowJson: $windowJson, ')
..write('tasksJson: $tasksJson, ')
..write('lockedIntervalsJson: $lockedIntervalsJson, ')
..write(
'requiredVisibleIntervalsJson: $requiredVisibleIntervalsJson, ')
..write('noticesJson: $noticesJson, ')
..write('changesJson: $changesJson, ')
..write('overlapsJson: $overlapsJson, ')
..write('retentionExpiresUtc: $retentionExpiresUtc, ')
..write('truncated: $truncated, ')
..write('revision: $revision, ')
..write('createdAtUtc: $createdAtUtc, ')
..write('updatedAtUtc: $updatedAtUtc, ')
..write('rowid: $rowid')
..write(')'))
.toString();
}
}
class $ApplicationOperationsTable extends ApplicationOperations
with TableInfo<$ApplicationOperationsTable, ApplicationOperationRow> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$ApplicationOperationsTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _operationIdMeta =
const VerificationMeta('operationId');
@override
late final GeneratedColumn<String> operationId = GeneratedColumn<String>(
'operation_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _ownerIdMeta =
const VerificationMeta('ownerId');
@override
late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(
'owner_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _operationNameMeta =
const VerificationMeta('operationName');
@override
late final GeneratedColumn<String> operationName = GeneratedColumn<String>(
'operation_name', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _committedAtUtcMeta =
const VerificationMeta('committedAtUtc');
@override
late final GeneratedColumn<DateTime> committedAtUtc =
GeneratedColumn<DateTime>('committed_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
@override
List<GeneratedColumn> get $columns =>
[operationId, ownerId, operationName, committedAtUtc];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'application_operations';
@override
VerificationContext validateIntegrity(
Insertable<ApplicationOperationRow> instance,
{bool isInserting = false}) {
final context = VerificationContext();
final data = instance.toColumns(true);
if (data.containsKey('operation_id')) {
context.handle(
_operationIdMeta,
operationId.isAcceptableOrUnknown(
data['operation_id']!, _operationIdMeta));
} else if (isInserting) {
context.missing(_operationIdMeta);
}
if (data.containsKey('owner_id')) {
context.handle(_ownerIdMeta,
ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta));
} else if (isInserting) {
context.missing(_ownerIdMeta);
}
if (data.containsKey('operation_name')) {
context.handle(
_operationNameMeta,
operationName.isAcceptableOrUnknown(
data['operation_name']!, _operationNameMeta));
} else if (isInserting) {
context.missing(_operationNameMeta);
}
if (data.containsKey('committed_at_utc')) {
context.handle(
_committedAtUtcMeta,
committedAtUtc.isAcceptableOrUnknown(
data['committed_at_utc']!, _committedAtUtcMeta));
} else if (isInserting) {
context.missing(_committedAtUtcMeta);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {operationId};
@override
ApplicationOperationRow map(Map<String, dynamic> data,
{String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return ApplicationOperationRow(
operationId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}operation_id'])!,
ownerId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,
operationName: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}operation_name'])!,
committedAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}committed_at_utc'])!,
);
}
@override
$ApplicationOperationsTable createAlias(String alias) {
return $ApplicationOperationsTable(attachedDatabase, alias);
}
}
class ApplicationOperationRow extends DataClass
implements Insertable<ApplicationOperationRow> {
/// Returns the derived `operationId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String operationId;
/// Returns the derived `ownerId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String ownerId;
/// Returns the derived `operationName` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String operationName;
/// Returns the derived `committedAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime committedAtUtc;
const ApplicationOperationRow(
{required this.operationId,
required this.ownerId,
required this.operationName,
required this.committedAtUtc});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['operation_id'] = Variable<String>(operationId);
map['owner_id'] = Variable<String>(ownerId);
map['operation_name'] = Variable<String>(operationName);
map['committed_at_utc'] = Variable<DateTime>(committedAtUtc);
return map;
}
ApplicationOperationsCompanion toCompanion(bool nullToAbsent) {
return ApplicationOperationsCompanion(
operationId: Value(operationId),
ownerId: Value(ownerId),
operationName: Value(operationName),
committedAtUtc: Value(committedAtUtc),
);
}
factory ApplicationOperationRow.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return ApplicationOperationRow(
operationId: serializer.fromJson<String>(json['operationId']),
ownerId: serializer.fromJson<String>(json['ownerId']),
operationName: serializer.fromJson<String>(json['operationName']),
committedAtUtc: serializer.fromJson<DateTime>(json['committedAtUtc']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'operationId': serializer.toJson<String>(operationId),
'ownerId': serializer.toJson<String>(ownerId),
'operationName': serializer.toJson<String>(operationName),
'committedAtUtc': serializer.toJson<DateTime>(committedAtUtc),
};
}
ApplicationOperationRow copyWith(
{String? operationId,
String? ownerId,
String? operationName,
DateTime? committedAtUtc}) =>
ApplicationOperationRow(
operationId: operationId ?? this.operationId,
ownerId: ownerId ?? this.ownerId,
operationName: operationName ?? this.operationName,
committedAtUtc: committedAtUtc ?? this.committedAtUtc,
);
ApplicationOperationRow copyWithCompanion(
ApplicationOperationsCompanion data) {
return ApplicationOperationRow(
operationId:
data.operationId.present ? data.operationId.value : this.operationId,
ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,
operationName: data.operationName.present
? data.operationName.value
: this.operationName,
committedAtUtc: data.committedAtUtc.present
? data.committedAtUtc.value
: this.committedAtUtc,
);
}
@override
String toString() {
return (StringBuffer('ApplicationOperationRow(')
..write('operationId: $operationId, ')
..write('ownerId: $ownerId, ')
..write('operationName: $operationName, ')
..write('committedAtUtc: $committedAtUtc')
..write(')'))
.toString();
}
@override
int get hashCode =>
Object.hash(operationId, ownerId, operationName, committedAtUtc);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is ApplicationOperationRow &&
other.operationId == this.operationId &&
other.ownerId == this.ownerId &&
other.operationName == this.operationName &&
other.committedAtUtc == this.committedAtUtc);
}
class ApplicationOperationsCompanion
extends UpdateCompanion<ApplicationOperationRow> {
final Value<String> operationId;
final Value<String> ownerId;
final Value<String> operationName;
final Value<DateTime> committedAtUtc;
final Value<int> rowid;
const ApplicationOperationsCompanion({
this.operationId = const Value.absent(),
this.ownerId = const Value.absent(),
this.operationName = const Value.absent(),
this.committedAtUtc = const Value.absent(),
this.rowid = const Value.absent(),
});
ApplicationOperationsCompanion.insert({
required String operationId,
required String ownerId,
required String operationName,
required DateTime committedAtUtc,
this.rowid = const Value.absent(),
}) : operationId = Value(operationId),
ownerId = Value(ownerId),
operationName = Value(operationName),
committedAtUtc = Value(committedAtUtc);
static Insertable<ApplicationOperationRow> custom({
Expression<String>? operationId,
Expression<String>? ownerId,
Expression<String>? operationName,
Expression<DateTime>? committedAtUtc,
Expression<int>? rowid,
}) {
return RawValuesInsertable({
if (operationId != null) 'operation_id': operationId,
if (ownerId != null) 'owner_id': ownerId,
if (operationName != null) 'operation_name': operationName,
if (committedAtUtc != null) 'committed_at_utc': committedAtUtc,
if (rowid != null) 'rowid': rowid,
});
}
ApplicationOperationsCompanion copyWith(
{Value<String>? operationId,
Value<String>? ownerId,
Value<String>? operationName,
Value<DateTime>? committedAtUtc,
Value<int>? rowid}) {
return ApplicationOperationsCompanion(
operationId: operationId ?? this.operationId,
ownerId: ownerId ?? this.ownerId,
operationName: operationName ?? this.operationName,
committedAtUtc: committedAtUtc ?? this.committedAtUtc,
rowid: rowid ?? this.rowid,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (operationId.present) {
map['operation_id'] = Variable<String>(operationId.value);
}
if (ownerId.present) {
map['owner_id'] = Variable<String>(ownerId.value);
}
if (operationName.present) {
map['operation_name'] = Variable<String>(operationName.value);
}
if (committedAtUtc.present) {
map['committed_at_utc'] = Variable<DateTime>(committedAtUtc.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(rowid.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('ApplicationOperationsCompanion(')
..write('operationId: $operationId, ')
..write('ownerId: $ownerId, ')
..write('operationName: $operationName, ')
..write('committedAtUtc: $committedAtUtc, ')
..write('rowid: $rowid')
..write(')'))
.toString();
}
}
class $NoticeAcknowledgementsTable extends NoticeAcknowledgements
with TableInfo<$NoticeAcknowledgementsTable, NoticeAcknowledgementRow> {
@override
final GeneratedDatabase attachedDatabase;
final String? _alias;
$NoticeAcknowledgementsTable(this.attachedDatabase, [this._alias]);
static const VerificationMeta _ownerIdMeta =
const VerificationMeta('ownerId');
@override
late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(
'owner_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _noticeIdMeta =
const VerificationMeta('noticeId');
@override
late final GeneratedColumn<String> noticeId = GeneratedColumn<String>(
'notice_id', aliasedName, false,
type: DriftSqlType.string, requiredDuringInsert: true);
static const VerificationMeta _acknowledgedAtUtcMeta =
const VerificationMeta('acknowledgedAtUtc');
@override
late final GeneratedColumn<DateTime> acknowledgedAtUtc =
GeneratedColumn<DateTime>('acknowledged_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
static const VerificationMeta _revisionMeta =
const VerificationMeta('revision');
@override
late final GeneratedColumn<int> revision = GeneratedColumn<int>(
'revision', aliasedName, false,
type: DriftSqlType.int, requiredDuringInsert: true);
static const VerificationMeta _createdAtUtcMeta =
const VerificationMeta('createdAtUtc');
@override
late final GeneratedColumn<DateTime> createdAtUtc = GeneratedColumn<DateTime>(
'created_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
static const VerificationMeta _updatedAtUtcMeta =
const VerificationMeta('updatedAtUtc');
@override
late final GeneratedColumn<DateTime> updatedAtUtc = GeneratedColumn<DateTime>(
'updated_at_utc', aliasedName, false,
type: DriftSqlType.dateTime, requiredDuringInsert: true);
@override
List<GeneratedColumn> get $columns => [
ownerId,
noticeId,
acknowledgedAtUtc,
revision,
createdAtUtc,
updatedAtUtc
];
@override
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'notice_acknowledgements';
@override
VerificationContext validateIntegrity(
Insertable<NoticeAcknowledgementRow> instance,
{bool isInserting = false}) {
final context = VerificationContext();
final data = instance.toColumns(true);
if (data.containsKey('owner_id')) {
context.handle(_ownerIdMeta,
ownerId.isAcceptableOrUnknown(data['owner_id']!, _ownerIdMeta));
} else if (isInserting) {
context.missing(_ownerIdMeta);
}
if (data.containsKey('notice_id')) {
context.handle(_noticeIdMeta,
noticeId.isAcceptableOrUnknown(data['notice_id']!, _noticeIdMeta));
} else if (isInserting) {
context.missing(_noticeIdMeta);
}
if (data.containsKey('acknowledged_at_utc')) {
context.handle(
_acknowledgedAtUtcMeta,
acknowledgedAtUtc.isAcceptableOrUnknown(
data['acknowledged_at_utc']!, _acknowledgedAtUtcMeta));
} else if (isInserting) {
context.missing(_acknowledgedAtUtcMeta);
}
if (data.containsKey('revision')) {
context.handle(_revisionMeta,
revision.isAcceptableOrUnknown(data['revision']!, _revisionMeta));
} else if (isInserting) {
context.missing(_revisionMeta);
}
if (data.containsKey('created_at_utc')) {
context.handle(
_createdAtUtcMeta,
createdAtUtc.isAcceptableOrUnknown(
data['created_at_utc']!, _createdAtUtcMeta));
} else if (isInserting) {
context.missing(_createdAtUtcMeta);
}
if (data.containsKey('updated_at_utc')) {
context.handle(
_updatedAtUtcMeta,
updatedAtUtc.isAcceptableOrUnknown(
data['updated_at_utc']!, _updatedAtUtcMeta));
} else if (isInserting) {
context.missing(_updatedAtUtcMeta);
}
return context;
}
@override
Set<GeneratedColumn> get $primaryKey => {ownerId, noticeId};
@override
NoticeAcknowledgementRow map(Map<String, dynamic> data,
{String? tablePrefix}) {
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
return NoticeAcknowledgementRow(
ownerId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!,
noticeId: attachedDatabase.typeMapping
.read(DriftSqlType.string, data['${effectivePrefix}notice_id'])!,
acknowledgedAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime,
data['${effectivePrefix}acknowledged_at_utc'])!,
revision: attachedDatabase.typeMapping
.read(DriftSqlType.int, data['${effectivePrefix}revision'])!,
createdAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}created_at_utc'])!,
updatedAtUtc: attachedDatabase.typeMapping.read(
DriftSqlType.dateTime, data['${effectivePrefix}updated_at_utc'])!,
);
}
@override
$NoticeAcknowledgementsTable createAlias(String alias) {
return $NoticeAcknowledgementsTable(attachedDatabase, alias);
}
}
class NoticeAcknowledgementRow extends DataClass
implements Insertable<NoticeAcknowledgementRow> {
/// Returns the derived `ownerId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String ownerId;
/// Returns the derived `noticeId` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final String noticeId;
/// Returns the derived `acknowledgedAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime acknowledgedAtUtc;
/// Returns the derived `revision` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final int revision;
/// Returns the derived `createdAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime createdAtUtc;
/// Returns the derived `updatedAtUtc` value for this object.
/// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
final DateTime updatedAtUtc;
const NoticeAcknowledgementRow(
{required this.ownerId,
required this.noticeId,
required this.acknowledgedAtUtc,
required this.revision,
required this.createdAtUtc,
required this.updatedAtUtc});
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
map['owner_id'] = Variable<String>(ownerId);
map['notice_id'] = Variable<String>(noticeId);
map['acknowledged_at_utc'] = Variable<DateTime>(acknowledgedAtUtc);
map['revision'] = Variable<int>(revision);
map['created_at_utc'] = Variable<DateTime>(createdAtUtc);
map['updated_at_utc'] = Variable<DateTime>(updatedAtUtc);
return map;
}
NoticeAcknowledgementsCompanion toCompanion(bool nullToAbsent) {
return NoticeAcknowledgementsCompanion(
ownerId: Value(ownerId),
noticeId: Value(noticeId),
acknowledgedAtUtc: Value(acknowledgedAtUtc),
revision: Value(revision),
createdAtUtc: Value(createdAtUtc),
updatedAtUtc: Value(updatedAtUtc),
);
}
factory NoticeAcknowledgementRow.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return NoticeAcknowledgementRow(
ownerId: serializer.fromJson<String>(json['ownerId']),
noticeId: serializer.fromJson<String>(json['noticeId']),
acknowledgedAtUtc:
serializer.fromJson<DateTime>(json['acknowledgedAtUtc']),
revision: serializer.fromJson<int>(json['revision']),
createdAtUtc: serializer.fromJson<DateTime>(json['createdAtUtc']),
updatedAtUtc: serializer.fromJson<DateTime>(json['updatedAtUtc']),
);
}
@override
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return <String, dynamic>{
'ownerId': serializer.toJson<String>(ownerId),
'noticeId': serializer.toJson<String>(noticeId),
'acknowledgedAtUtc': serializer.toJson<DateTime>(acknowledgedAtUtc),
'revision': serializer.toJson<int>(revision),
'createdAtUtc': serializer.toJson<DateTime>(createdAtUtc),
'updatedAtUtc': serializer.toJson<DateTime>(updatedAtUtc),
};
}
NoticeAcknowledgementRow copyWith(
{String? ownerId,
String? noticeId,
DateTime? acknowledgedAtUtc,
int? revision,
DateTime? createdAtUtc,
DateTime? updatedAtUtc}) =>
NoticeAcknowledgementRow(
ownerId: ownerId ?? this.ownerId,
noticeId: noticeId ?? this.noticeId,
acknowledgedAtUtc: acknowledgedAtUtc ?? this.acknowledgedAtUtc,
revision: revision ?? this.revision,
createdAtUtc: createdAtUtc ?? this.createdAtUtc,
updatedAtUtc: updatedAtUtc ?? this.updatedAtUtc,
);
NoticeAcknowledgementRow copyWithCompanion(
NoticeAcknowledgementsCompanion data) {
return NoticeAcknowledgementRow(
ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId,
noticeId: data.noticeId.present ? data.noticeId.value : this.noticeId,
acknowledgedAtUtc: data.acknowledgedAtUtc.present
? data.acknowledgedAtUtc.value
: this.acknowledgedAtUtc,
revision: data.revision.present ? data.revision.value : this.revision,
createdAtUtc: data.createdAtUtc.present
? data.createdAtUtc.value
: this.createdAtUtc,
updatedAtUtc: data.updatedAtUtc.present
? data.updatedAtUtc.value
: this.updatedAtUtc,
);
}
@override
String toString() {
return (StringBuffer('NoticeAcknowledgementRow(')
..write('ownerId: $ownerId, ')
..write('noticeId: $noticeId, ')
..write('acknowledgedAtUtc: $acknowledgedAtUtc, ')
..write('revision: $revision, ')
..write('createdAtUtc: $createdAtUtc, ')
..write('updatedAtUtc: $updatedAtUtc')
..write(')'))
.toString();
}
@override
int get hashCode => Object.hash(ownerId, noticeId, acknowledgedAtUtc,
revision, createdAtUtc, updatedAtUtc);
@override
bool operator ==(Object other) =>
identical(this, other) ||
(other is NoticeAcknowledgementRow &&
other.ownerId == this.ownerId &&
other.noticeId == this.noticeId &&
other.acknowledgedAtUtc == this.acknowledgedAtUtc &&
other.revision == this.revision &&
other.createdAtUtc == this.createdAtUtc &&
other.updatedAtUtc == this.updatedAtUtc);
}
class NoticeAcknowledgementsCompanion
extends UpdateCompanion<NoticeAcknowledgementRow> {
final Value<String> ownerId;
final Value<String> noticeId;
final Value<DateTime> acknowledgedAtUtc;
final Value<int> revision;
final Value<DateTime> createdAtUtc;
final Value<DateTime> updatedAtUtc;
final Value<int> rowid;
const NoticeAcknowledgementsCompanion({
this.ownerId = const Value.absent(),
this.noticeId = const Value.absent(),
this.acknowledgedAtUtc = const Value.absent(),
this.revision = const Value.absent(),
this.createdAtUtc = const Value.absent(),
this.updatedAtUtc = const Value.absent(),
this.rowid = const Value.absent(),
});
NoticeAcknowledgementsCompanion.insert({
required String ownerId,
required String noticeId,
required DateTime acknowledgedAtUtc,
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
this.rowid = const Value.absent(),
}) : ownerId = Value(ownerId),
noticeId = Value(noticeId),
acknowledgedAtUtc = Value(acknowledgedAtUtc),
revision = Value(revision),
createdAtUtc = Value(createdAtUtc),
updatedAtUtc = Value(updatedAtUtc);
static Insertable<NoticeAcknowledgementRow> custom({
Expression<String>? ownerId,
Expression<String>? noticeId,
Expression<DateTime>? acknowledgedAtUtc,
Expression<int>? revision,
Expression<DateTime>? createdAtUtc,
Expression<DateTime>? updatedAtUtc,
Expression<int>? rowid,
}) {
return RawValuesInsertable({
if (ownerId != null) 'owner_id': ownerId,
if (noticeId != null) 'notice_id': noticeId,
if (acknowledgedAtUtc != null) 'acknowledged_at_utc': acknowledgedAtUtc,
if (revision != null) 'revision': revision,
if (createdAtUtc != null) 'created_at_utc': createdAtUtc,
if (updatedAtUtc != null) 'updated_at_utc': updatedAtUtc,
if (rowid != null) 'rowid': rowid,
});
}
NoticeAcknowledgementsCompanion copyWith(
{Value<String>? ownerId,
Value<String>? noticeId,
Value<DateTime>? acknowledgedAtUtc,
Value<int>? revision,
Value<DateTime>? createdAtUtc,
Value<DateTime>? updatedAtUtc,
Value<int>? rowid}) {
return NoticeAcknowledgementsCompanion(
ownerId: ownerId ?? this.ownerId,
noticeId: noticeId ?? this.noticeId,
acknowledgedAtUtc: acknowledgedAtUtc ?? this.acknowledgedAtUtc,
revision: revision ?? this.revision,
createdAtUtc: createdAtUtc ?? this.createdAtUtc,
updatedAtUtc: updatedAtUtc ?? this.updatedAtUtc,
rowid: rowid ?? this.rowid,
);
}
@override
Map<String, Expression> toColumns(bool nullToAbsent) {
final map = <String, Expression>{};
if (ownerId.present) {
map['owner_id'] = Variable<String>(ownerId.value);
}
if (noticeId.present) {
map['notice_id'] = Variable<String>(noticeId.value);
}
if (acknowledgedAtUtc.present) {
map['acknowledged_at_utc'] = Variable<DateTime>(acknowledgedAtUtc.value);
}
if (revision.present) {
map['revision'] = Variable<int>(revision.value);
}
if (createdAtUtc.present) {
map['created_at_utc'] = Variable<DateTime>(createdAtUtc.value);
}
if (updatedAtUtc.present) {
map['updated_at_utc'] = Variable<DateTime>(updatedAtUtc.value);
}
if (rowid.present) {
map['rowid'] = Variable<int>(rowid.value);
}
return map;
}
@override
String toString() {
return (StringBuffer('NoticeAcknowledgementsCompanion(')
..write('ownerId: $ownerId, ')
..write('noticeId: $noticeId, ')
..write('acknowledgedAtUtc: $acknowledgedAtUtc, ')
..write('revision: $revision, ')
..write('createdAtUtc: $createdAtUtc, ')
..write('updatedAtUtc: $updatedAtUtc, ')
..write('rowid: $rowid')
..write(')'))
.toString();
}
}
abstract class _$SchedulerDb extends GeneratedDatabase {
_$SchedulerDb(QueryExecutor e) : super(e);
$SchedulerDbManager get managers => $SchedulerDbManager(this);
late final $TasksTable tasks = $TasksTable(this);
late final $TaskActivitiesTable taskActivities = $TaskActivitiesTable(this);
late final $ProjectsTable projects = $ProjectsTable(this);
late final $ProjectStatisticsTableTable projectStatisticsTable =
$ProjectStatisticsTableTable(this);
late final $LockedBlocksTable lockedBlocks = $LockedBlocksTable(this);
late final $LockedOverridesTable lockedOverrides =
$LockedOverridesTable(this);
late final $SettingsTableTable settingsTable = $SettingsTableTable(this);
late final $SnapshotsTable snapshots = $SnapshotsTable(this);
late final $ApplicationOperationsTable applicationOperations =
$ApplicationOperationsTable(this);
late final $NoticeAcknowledgementsTable noticeAcknowledgements =
$NoticeAcknowledgementsTable(this);
late final TaskDao taskDao = TaskDao(this as SchedulerDb);
late final ProjectDao projectDao = ProjectDao(this as SchedulerDb);
late final LockedBlockDao lockedBlockDao =
LockedBlockDao(this as SchedulerDb);
late final SettingsDao settingsDao = SettingsDao(this as SchedulerDb);
late final SnapshotDao snapshotDao = SnapshotDao(this as SchedulerDb);
@override
Iterable<TableInfo<Table, Object?>> get allTables =>
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
@override
List<DatabaseSchemaEntity> get allSchemaEntities => [
tasks,
taskActivities,
projects,
projectStatisticsTable,
lockedBlocks,
lockedOverrides,
settingsTable,
snapshots,
applicationOperations,
noticeAcknowledgements
];
}
typedef $$TasksTableCreateCompanionBuilder = TasksCompanion Function({
required String id,
required String ownerId,
required String title,
required String projectId,
Value<String?> parentId,
required String type,
required String status,
Value<String?> priority,
required String reward,
required String difficulty,
Value<int?> durationMinutes,
Value<DateTime?> scheduledStartUtc,
Value<DateTime?> scheduledEndUtc,
Value<DateTime?> actualStartUtc,
Value<DateTime?> actualEndUtc,
Value<DateTime?> completedAtUtc,
required String backlogTagsJson,
Value<String?> reminderOverride,
required String statsJson,
Value<DateTime?> backlogEnteredAtUtc,
Value<String?> backlogEnteredProvenance,
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
Value<int> rowid,
});
typedef $$TasksTableUpdateCompanionBuilder = TasksCompanion Function({
Value<String> id,
Value<String> ownerId,
Value<String> title,
Value<String> projectId,
Value<String?> parentId,
Value<String> type,
Value<String> status,
Value<String?> priority,
Value<String> reward,
Value<String> difficulty,
Value<int?> durationMinutes,
Value<DateTime?> scheduledStartUtc,
Value<DateTime?> scheduledEndUtc,
Value<DateTime?> actualStartUtc,
Value<DateTime?> actualEndUtc,
Value<DateTime?> completedAtUtc,
Value<String> backlogTagsJson,
Value<String?> reminderOverride,
Value<String> statsJson,
Value<DateTime?> backlogEnteredAtUtc,
Value<String?> backlogEnteredProvenance,
Value<int> revision,
Value<DateTime> createdAtUtc,
Value<DateTime> updatedAtUtc,
Value<int> rowid,
});
class $$TasksTableFilterComposer extends Composer<_$SchedulerDb, $TasksTable> {
$$TasksTableFilterComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnFilters<String> get id => $composableBuilder(
column: $table.id, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get title => $composableBuilder(
column: $table.title, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get projectId => $composableBuilder(
column: $table.projectId, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get parentId => $composableBuilder(
column: $table.parentId, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get type => $composableBuilder(
column: $table.type, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get status => $composableBuilder(
column: $table.status, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get priority => $composableBuilder(
column: $table.priority, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get reward => $composableBuilder(
column: $table.reward, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get difficulty => $composableBuilder(
column: $table.difficulty, builder: (column) => ColumnFilters(column));
ColumnFilters<int> get durationMinutes => $composableBuilder(
column: $table.durationMinutes,
builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get scheduledStartUtc => $composableBuilder(
column: $table.scheduledStartUtc,
builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get scheduledEndUtc => $composableBuilder(
column: $table.scheduledEndUtc,
builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get actualStartUtc => $composableBuilder(
column: $table.actualStartUtc,
builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get actualEndUtc => $composableBuilder(
column: $table.actualEndUtc, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get completedAtUtc => $composableBuilder(
column: $table.completedAtUtc,
builder: (column) => ColumnFilters(column));
ColumnFilters<String> get backlogTagsJson => $composableBuilder(
column: $table.backlogTagsJson,
builder: (column) => ColumnFilters(column));
ColumnFilters<String> get reminderOverride => $composableBuilder(
column: $table.reminderOverride,
builder: (column) => ColumnFilters(column));
ColumnFilters<String> get statsJson => $composableBuilder(
column: $table.statsJson, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get backlogEnteredAtUtc => $composableBuilder(
column: $table.backlogEnteredAtUtc,
builder: (column) => ColumnFilters(column));
ColumnFilters<String> get backlogEnteredProvenance => $composableBuilder(
column: $table.backlogEnteredProvenance,
builder: (column) => ColumnFilters(column));
ColumnFilters<int> get revision => $composableBuilder(
column: $table.revision, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc, builder: (column) => ColumnFilters(column));
}
class $$TasksTableOrderingComposer
extends Composer<_$SchedulerDb, $TasksTable> {
$$TasksTableOrderingComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnOrderings<String> get id => $composableBuilder(
column: $table.id, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get title => $composableBuilder(
column: $table.title, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get projectId => $composableBuilder(
column: $table.projectId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get parentId => $composableBuilder(
column: $table.parentId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get type => $composableBuilder(
column: $table.type, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get status => $composableBuilder(
column: $table.status, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get priority => $composableBuilder(
column: $table.priority, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get reward => $composableBuilder(
column: $table.reward, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get difficulty => $composableBuilder(
column: $table.difficulty, builder: (column) => ColumnOrderings(column));
ColumnOrderings<int> get durationMinutes => $composableBuilder(
column: $table.durationMinutes,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get scheduledStartUtc => $composableBuilder(
column: $table.scheduledStartUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get scheduledEndUtc => $composableBuilder(
column: $table.scheduledEndUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get actualStartUtc => $composableBuilder(
column: $table.actualStartUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get actualEndUtc => $composableBuilder(
column: $table.actualEndUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get completedAtUtc => $composableBuilder(
column: $table.completedAtUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get backlogTagsJson => $composableBuilder(
column: $table.backlogTagsJson,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get reminderOverride => $composableBuilder(
column: $table.reminderOverride,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get statsJson => $composableBuilder(
column: $table.statsJson, builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get backlogEnteredAtUtc => $composableBuilder(
column: $table.backlogEnteredAtUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get backlogEnteredProvenance => $composableBuilder(
column: $table.backlogEnteredProvenance,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<int> get revision => $composableBuilder(
column: $table.revision, builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc,
builder: (column) => ColumnOrderings(column));
}
class $$TasksTableAnnotationComposer
extends Composer<_$SchedulerDb, $TasksTable> {
$$TasksTableAnnotationComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<String> get id =>
$composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumn<String> get ownerId =>
$composableBuilder(column: $table.ownerId, builder: (column) => column);
GeneratedColumn<String> get title =>
$composableBuilder(column: $table.title, builder: (column) => column);
GeneratedColumn<String> get projectId =>
$composableBuilder(column: $table.projectId, builder: (column) => column);
GeneratedColumn<String> get parentId =>
$composableBuilder(column: $table.parentId, builder: (column) => column);
GeneratedColumn<String> get type =>
$composableBuilder(column: $table.type, builder: (column) => column);
GeneratedColumn<String> get status =>
$composableBuilder(column: $table.status, builder: (column) => column);
GeneratedColumn<String> get priority =>
$composableBuilder(column: $table.priority, builder: (column) => column);
GeneratedColumn<String> get reward =>
$composableBuilder(column: $table.reward, builder: (column) => column);
GeneratedColumn<String> get difficulty => $composableBuilder(
column: $table.difficulty, builder: (column) => column);
GeneratedColumn<int> get durationMinutes => $composableBuilder(
column: $table.durationMinutes, builder: (column) => column);
GeneratedColumn<DateTime> get scheduledStartUtc => $composableBuilder(
column: $table.scheduledStartUtc, builder: (column) => column);
GeneratedColumn<DateTime> get scheduledEndUtc => $composableBuilder(
column: $table.scheduledEndUtc, builder: (column) => column);
GeneratedColumn<DateTime> get actualStartUtc => $composableBuilder(
column: $table.actualStartUtc, builder: (column) => column);
GeneratedColumn<DateTime> get actualEndUtc => $composableBuilder(
column: $table.actualEndUtc, builder: (column) => column);
GeneratedColumn<DateTime> get completedAtUtc => $composableBuilder(
column: $table.completedAtUtc, builder: (column) => column);
GeneratedColumn<String> get backlogTagsJson => $composableBuilder(
column: $table.backlogTagsJson, builder: (column) => column);
GeneratedColumn<String> get reminderOverride => $composableBuilder(
column: $table.reminderOverride, builder: (column) => column);
GeneratedColumn<String> get statsJson =>
$composableBuilder(column: $table.statsJson, builder: (column) => column);
GeneratedColumn<DateTime> get backlogEnteredAtUtc => $composableBuilder(
column: $table.backlogEnteredAtUtc, builder: (column) => column);
GeneratedColumn<String> get backlogEnteredProvenance => $composableBuilder(
column: $table.backlogEnteredProvenance, builder: (column) => column);
GeneratedColumn<int> get revision =>
$composableBuilder(column: $table.revision, builder: (column) => column);
GeneratedColumn<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc, builder: (column) => column);
GeneratedColumn<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc, builder: (column) => column);
}
class $$TasksTableTableManager extends RootTableManager<
_$SchedulerDb,
$TasksTable,
TaskRow,
$$TasksTableFilterComposer,
$$TasksTableOrderingComposer,
$$TasksTableAnnotationComposer,
$$TasksTableCreateCompanionBuilder,
$$TasksTableUpdateCompanionBuilder,
(TaskRow, BaseReferences<_$SchedulerDb, $TasksTable, TaskRow>),
TaskRow,
PrefetchHooks Function()> {
$$TasksTableTableManager(_$SchedulerDb db, $TasksTable table)
: super(TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$TasksTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$TasksTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$TasksTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback: ({
Value<String> id = const Value.absent(),
Value<String> ownerId = const Value.absent(),
Value<String> title = const Value.absent(),
Value<String> projectId = const Value.absent(),
Value<String?> parentId = const Value.absent(),
Value<String> type = const Value.absent(),
Value<String> status = const Value.absent(),
Value<String?> priority = const Value.absent(),
Value<String> reward = const Value.absent(),
Value<String> difficulty = const Value.absent(),
Value<int?> durationMinutes = const Value.absent(),
Value<DateTime?> scheduledStartUtc = const Value.absent(),
Value<DateTime?> scheduledEndUtc = const Value.absent(),
Value<DateTime?> actualStartUtc = const Value.absent(),
Value<DateTime?> actualEndUtc = const Value.absent(),
Value<DateTime?> completedAtUtc = const Value.absent(),
Value<String> backlogTagsJson = const Value.absent(),
Value<String?> reminderOverride = const Value.absent(),
Value<String> statsJson = const Value.absent(),
Value<DateTime?> backlogEnteredAtUtc = const Value.absent(),
Value<String?> backlogEnteredProvenance = const Value.absent(),
Value<int> revision = const Value.absent(),
Value<DateTime> createdAtUtc = const Value.absent(),
Value<DateTime> updatedAtUtc = const Value.absent(),
Value<int> rowid = const Value.absent(),
}) =>
TasksCompanion(
id: id,
ownerId: ownerId,
title: title,
projectId: projectId,
parentId: parentId,
type: type,
status: status,
priority: priority,
reward: reward,
difficulty: difficulty,
durationMinutes: durationMinutes,
scheduledStartUtc: scheduledStartUtc,
scheduledEndUtc: scheduledEndUtc,
actualStartUtc: actualStartUtc,
actualEndUtc: actualEndUtc,
completedAtUtc: completedAtUtc,
backlogTagsJson: backlogTagsJson,
reminderOverride: reminderOverride,
statsJson: statsJson,
backlogEnteredAtUtc: backlogEnteredAtUtc,
backlogEnteredProvenance: backlogEnteredProvenance,
revision: revision,
createdAtUtc: createdAtUtc,
updatedAtUtc: updatedAtUtc,
rowid: rowid,
),
createCompanionCallback: ({
required String id,
required String ownerId,
required String title,
required String projectId,
Value<String?> parentId = const Value.absent(),
required String type,
required String status,
Value<String?> priority = const Value.absent(),
required String reward,
required String difficulty,
Value<int?> durationMinutes = const Value.absent(),
Value<DateTime?> scheduledStartUtc = const Value.absent(),
Value<DateTime?> scheduledEndUtc = const Value.absent(),
Value<DateTime?> actualStartUtc = const Value.absent(),
Value<DateTime?> actualEndUtc = const Value.absent(),
Value<DateTime?> completedAtUtc = const Value.absent(),
required String backlogTagsJson,
Value<String?> reminderOverride = const Value.absent(),
required String statsJson,
Value<DateTime?> backlogEnteredAtUtc = const Value.absent(),
Value<String?> backlogEnteredProvenance = const Value.absent(),
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
Value<int> rowid = const Value.absent(),
}) =>
TasksCompanion.insert(
id: id,
ownerId: ownerId,
title: title,
projectId: projectId,
parentId: parentId,
type: type,
status: status,
priority: priority,
reward: reward,
difficulty: difficulty,
durationMinutes: durationMinutes,
scheduledStartUtc: scheduledStartUtc,
scheduledEndUtc: scheduledEndUtc,
actualStartUtc: actualStartUtc,
actualEndUtc: actualEndUtc,
completedAtUtc: completedAtUtc,
backlogTagsJson: backlogTagsJson,
reminderOverride: reminderOverride,
statsJson: statsJson,
backlogEnteredAtUtc: backlogEnteredAtUtc,
backlogEnteredProvenance: backlogEnteredProvenance,
revision: revision,
createdAtUtc: createdAtUtc,
updatedAtUtc: updatedAtUtc,
rowid: rowid,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
));
}
typedef $$TasksTableProcessedTableManager = ProcessedTableManager<
_$SchedulerDb,
$TasksTable,
TaskRow,
$$TasksTableFilterComposer,
$$TasksTableOrderingComposer,
$$TasksTableAnnotationComposer,
$$TasksTableCreateCompanionBuilder,
$$TasksTableUpdateCompanionBuilder,
(TaskRow, BaseReferences<_$SchedulerDb, $TasksTable, TaskRow>),
TaskRow,
PrefetchHooks Function()>;
typedef $$TaskActivitiesTableCreateCompanionBuilder = TaskActivitiesCompanion
Function({
required String id,
required String ownerId,
required String taskId,
required String projectId,
required String operationId,
required String code,
required DateTime occurredAtUtc,
required String metadataJson,
Value<int> rowid,
});
typedef $$TaskActivitiesTableUpdateCompanionBuilder = TaskActivitiesCompanion
Function({
Value<String> id,
Value<String> ownerId,
Value<String> taskId,
Value<String> projectId,
Value<String> operationId,
Value<String> code,
Value<DateTime> occurredAtUtc,
Value<String> metadataJson,
Value<int> rowid,
});
class $$TaskActivitiesTableFilterComposer
extends Composer<_$SchedulerDb, $TaskActivitiesTable> {
$$TaskActivitiesTableFilterComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnFilters<String> get id => $composableBuilder(
column: $table.id, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get taskId => $composableBuilder(
column: $table.taskId, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get projectId => $composableBuilder(
column: $table.projectId, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get operationId => $composableBuilder(
column: $table.operationId, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get code => $composableBuilder(
column: $table.code, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get occurredAtUtc => $composableBuilder(
column: $table.occurredAtUtc, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get metadataJson => $composableBuilder(
column: $table.metadataJson, builder: (column) => ColumnFilters(column));
}
class $$TaskActivitiesTableOrderingComposer
extends Composer<_$SchedulerDb, $TaskActivitiesTable> {
$$TaskActivitiesTableOrderingComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnOrderings<String> get id => $composableBuilder(
column: $table.id, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get taskId => $composableBuilder(
column: $table.taskId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get projectId => $composableBuilder(
column: $table.projectId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get operationId => $composableBuilder(
column: $table.operationId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get code => $composableBuilder(
column: $table.code, builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get occurredAtUtc => $composableBuilder(
column: $table.occurredAtUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get metadataJson => $composableBuilder(
column: $table.metadataJson,
builder: (column) => ColumnOrderings(column));
}
class $$TaskActivitiesTableAnnotationComposer
extends Composer<_$SchedulerDb, $TaskActivitiesTable> {
$$TaskActivitiesTableAnnotationComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<String> get id =>
$composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumn<String> get ownerId =>
$composableBuilder(column: $table.ownerId, builder: (column) => column);
GeneratedColumn<String> get taskId =>
$composableBuilder(column: $table.taskId, builder: (column) => column);
GeneratedColumn<String> get projectId =>
$composableBuilder(column: $table.projectId, builder: (column) => column);
GeneratedColumn<String> get operationId => $composableBuilder(
column: $table.operationId, builder: (column) => column);
GeneratedColumn<String> get code =>
$composableBuilder(column: $table.code, builder: (column) => column);
GeneratedColumn<DateTime> get occurredAtUtc => $composableBuilder(
column: $table.occurredAtUtc, builder: (column) => column);
GeneratedColumn<String> get metadataJson => $composableBuilder(
column: $table.metadataJson, builder: (column) => column);
}
class $$TaskActivitiesTableTableManager extends RootTableManager<
_$SchedulerDb,
$TaskActivitiesTable,
TaskActivityRow,
$$TaskActivitiesTableFilterComposer,
$$TaskActivitiesTableOrderingComposer,
$$TaskActivitiesTableAnnotationComposer,
$$TaskActivitiesTableCreateCompanionBuilder,
$$TaskActivitiesTableUpdateCompanionBuilder,
(
TaskActivityRow,
BaseReferences<_$SchedulerDb, $TaskActivitiesTable, TaskActivityRow>
),
TaskActivityRow,
PrefetchHooks Function()> {
$$TaskActivitiesTableTableManager(
_$SchedulerDb db, $TaskActivitiesTable table)
: super(TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$TaskActivitiesTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$TaskActivitiesTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$TaskActivitiesTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback: ({
Value<String> id = const Value.absent(),
Value<String> ownerId = const Value.absent(),
Value<String> taskId = const Value.absent(),
Value<String> projectId = const Value.absent(),
Value<String> operationId = const Value.absent(),
Value<String> code = const Value.absent(),
Value<DateTime> occurredAtUtc = const Value.absent(),
Value<String> metadataJson = const Value.absent(),
Value<int> rowid = const Value.absent(),
}) =>
TaskActivitiesCompanion(
id: id,
ownerId: ownerId,
taskId: taskId,
projectId: projectId,
operationId: operationId,
code: code,
occurredAtUtc: occurredAtUtc,
metadataJson: metadataJson,
rowid: rowid,
),
createCompanionCallback: ({
required String id,
required String ownerId,
required String taskId,
required String projectId,
required String operationId,
required String code,
required DateTime occurredAtUtc,
required String metadataJson,
Value<int> rowid = const Value.absent(),
}) =>
TaskActivitiesCompanion.insert(
id: id,
ownerId: ownerId,
taskId: taskId,
projectId: projectId,
operationId: operationId,
code: code,
occurredAtUtc: occurredAtUtc,
metadataJson: metadataJson,
rowid: rowid,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
));
}
typedef $$TaskActivitiesTableProcessedTableManager = ProcessedTableManager<
_$SchedulerDb,
$TaskActivitiesTable,
TaskActivityRow,
$$TaskActivitiesTableFilterComposer,
$$TaskActivitiesTableOrderingComposer,
$$TaskActivitiesTableAnnotationComposer,
$$TaskActivitiesTableCreateCompanionBuilder,
$$TaskActivitiesTableUpdateCompanionBuilder,
(
TaskActivityRow,
BaseReferences<_$SchedulerDb, $TaskActivitiesTable, TaskActivityRow>
),
TaskActivityRow,
PrefetchHooks Function()>;
typedef $$ProjectsTableCreateCompanionBuilder = ProjectsCompanion Function({
required String id,
required String ownerId,
required String name,
required String colorKey,
required String defaultPriority,
required String defaultReward,
required String defaultDifficulty,
required String defaultReminderProfile,
Value<int?> defaultDurationMinutes,
Value<DateTime?> archivedAtUtc,
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
Value<int> rowid,
});
typedef $$ProjectsTableUpdateCompanionBuilder = ProjectsCompanion Function({
Value<String> id,
Value<String> ownerId,
Value<String> name,
Value<String> colorKey,
Value<String> defaultPriority,
Value<String> defaultReward,
Value<String> defaultDifficulty,
Value<String> defaultReminderProfile,
Value<int?> defaultDurationMinutes,
Value<DateTime?> archivedAtUtc,
Value<int> revision,
Value<DateTime> createdAtUtc,
Value<DateTime> updatedAtUtc,
Value<int> rowid,
});
class $$ProjectsTableFilterComposer
extends Composer<_$SchedulerDb, $ProjectsTable> {
$$ProjectsTableFilterComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnFilters<String> get id => $composableBuilder(
column: $table.id, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get name => $composableBuilder(
column: $table.name, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get colorKey => $composableBuilder(
column: $table.colorKey, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get defaultPriority => $composableBuilder(
column: $table.defaultPriority,
builder: (column) => ColumnFilters(column));
ColumnFilters<String> get defaultReward => $composableBuilder(
column: $table.defaultReward, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get defaultDifficulty => $composableBuilder(
column: $table.defaultDifficulty,
builder: (column) => ColumnFilters(column));
ColumnFilters<String> get defaultReminderProfile => $composableBuilder(
column: $table.defaultReminderProfile,
builder: (column) => ColumnFilters(column));
ColumnFilters<int> get defaultDurationMinutes => $composableBuilder(
column: $table.defaultDurationMinutes,
builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get archivedAtUtc => $composableBuilder(
column: $table.archivedAtUtc, builder: (column) => ColumnFilters(column));
ColumnFilters<int> get revision => $composableBuilder(
column: $table.revision, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc, builder: (column) => ColumnFilters(column));
}
class $$ProjectsTableOrderingComposer
extends Composer<_$SchedulerDb, $ProjectsTable> {
$$ProjectsTableOrderingComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnOrderings<String> get id => $composableBuilder(
column: $table.id, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get name => $composableBuilder(
column: $table.name, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get colorKey => $composableBuilder(
column: $table.colorKey, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get defaultPriority => $composableBuilder(
column: $table.defaultPriority,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get defaultReward => $composableBuilder(
column: $table.defaultReward,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get defaultDifficulty => $composableBuilder(
column: $table.defaultDifficulty,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get defaultReminderProfile => $composableBuilder(
column: $table.defaultReminderProfile,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<int> get defaultDurationMinutes => $composableBuilder(
column: $table.defaultDurationMinutes,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get archivedAtUtc => $composableBuilder(
column: $table.archivedAtUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<int> get revision => $composableBuilder(
column: $table.revision, builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc,
builder: (column) => ColumnOrderings(column));
}
class $$ProjectsTableAnnotationComposer
extends Composer<_$SchedulerDb, $ProjectsTable> {
$$ProjectsTableAnnotationComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<String> get id =>
$composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumn<String> get ownerId =>
$composableBuilder(column: $table.ownerId, builder: (column) => column);
GeneratedColumn<String> get name =>
$composableBuilder(column: $table.name, builder: (column) => column);
GeneratedColumn<String> get colorKey =>
$composableBuilder(column: $table.colorKey, builder: (column) => column);
GeneratedColumn<String> get defaultPriority => $composableBuilder(
column: $table.defaultPriority, builder: (column) => column);
GeneratedColumn<String> get defaultReward => $composableBuilder(
column: $table.defaultReward, builder: (column) => column);
GeneratedColumn<String> get defaultDifficulty => $composableBuilder(
column: $table.defaultDifficulty, builder: (column) => column);
GeneratedColumn<String> get defaultReminderProfile => $composableBuilder(
column: $table.defaultReminderProfile, builder: (column) => column);
GeneratedColumn<int> get defaultDurationMinutes => $composableBuilder(
column: $table.defaultDurationMinutes, builder: (column) => column);
GeneratedColumn<DateTime> get archivedAtUtc => $composableBuilder(
column: $table.archivedAtUtc, builder: (column) => column);
GeneratedColumn<int> get revision =>
$composableBuilder(column: $table.revision, builder: (column) => column);
GeneratedColumn<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc, builder: (column) => column);
GeneratedColumn<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc, builder: (column) => column);
}
class $$ProjectsTableTableManager extends RootTableManager<
_$SchedulerDb,
$ProjectsTable,
ProjectRow,
$$ProjectsTableFilterComposer,
$$ProjectsTableOrderingComposer,
$$ProjectsTableAnnotationComposer,
$$ProjectsTableCreateCompanionBuilder,
$$ProjectsTableUpdateCompanionBuilder,
(ProjectRow, BaseReferences<_$SchedulerDb, $ProjectsTable, ProjectRow>),
ProjectRow,
PrefetchHooks Function()> {
$$ProjectsTableTableManager(_$SchedulerDb db, $ProjectsTable table)
: super(TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$ProjectsTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$ProjectsTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$ProjectsTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback: ({
Value<String> id = const Value.absent(),
Value<String> ownerId = const Value.absent(),
Value<String> name = const Value.absent(),
Value<String> colorKey = const Value.absent(),
Value<String> defaultPriority = const Value.absent(),
Value<String> defaultReward = const Value.absent(),
Value<String> defaultDifficulty = const Value.absent(),
Value<String> defaultReminderProfile = const Value.absent(),
Value<int?> defaultDurationMinutes = const Value.absent(),
Value<DateTime?> archivedAtUtc = const Value.absent(),
Value<int> revision = const Value.absent(),
Value<DateTime> createdAtUtc = const Value.absent(),
Value<DateTime> updatedAtUtc = const Value.absent(),
Value<int> rowid = const Value.absent(),
}) =>
ProjectsCompanion(
id: id,
ownerId: ownerId,
name: name,
colorKey: colorKey,
defaultPriority: defaultPriority,
defaultReward: defaultReward,
defaultDifficulty: defaultDifficulty,
defaultReminderProfile: defaultReminderProfile,
defaultDurationMinutes: defaultDurationMinutes,
archivedAtUtc: archivedAtUtc,
revision: revision,
createdAtUtc: createdAtUtc,
updatedAtUtc: updatedAtUtc,
rowid: rowid,
),
createCompanionCallback: ({
required String id,
required String ownerId,
required String name,
required String colorKey,
required String defaultPriority,
required String defaultReward,
required String defaultDifficulty,
required String defaultReminderProfile,
Value<int?> defaultDurationMinutes = const Value.absent(),
Value<DateTime?> archivedAtUtc = const Value.absent(),
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
Value<int> rowid = const Value.absent(),
}) =>
ProjectsCompanion.insert(
id: id,
ownerId: ownerId,
name: name,
colorKey: colorKey,
defaultPriority: defaultPriority,
defaultReward: defaultReward,
defaultDifficulty: defaultDifficulty,
defaultReminderProfile: defaultReminderProfile,
defaultDurationMinutes: defaultDurationMinutes,
archivedAtUtc: archivedAtUtc,
revision: revision,
createdAtUtc: createdAtUtc,
updatedAtUtc: updatedAtUtc,
rowid: rowid,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
));
}
typedef $$ProjectsTableProcessedTableManager = ProcessedTableManager<
_$SchedulerDb,
$ProjectsTable,
ProjectRow,
$$ProjectsTableFilterComposer,
$$ProjectsTableOrderingComposer,
$$ProjectsTableAnnotationComposer,
$$ProjectsTableCreateCompanionBuilder,
$$ProjectsTableUpdateCompanionBuilder,
(ProjectRow, BaseReferences<_$SchedulerDb, $ProjectsTable, ProjectRow>),
ProjectRow,
PrefetchHooks Function()>;
typedef $$ProjectStatisticsTableTableCreateCompanionBuilder
= ProjectStatisticsTableCompanion Function({
required String projectId,
required String ownerId,
required int completedTaskCount,
required String durationMinuteCountsJson,
required String completionTimeBucketCountsJson,
required int totalPushesBeforeCompletion,
required int completedAfterPushCount,
required String rewardCountsJson,
required String difficultyCountsJson,
required String reminderProfileCountsJson,
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
Value<int> rowid,
});
typedef $$ProjectStatisticsTableTableUpdateCompanionBuilder
= ProjectStatisticsTableCompanion Function({
Value<String> projectId,
Value<String> ownerId,
Value<int> completedTaskCount,
Value<String> durationMinuteCountsJson,
Value<String> completionTimeBucketCountsJson,
Value<int> totalPushesBeforeCompletion,
Value<int> completedAfterPushCount,
Value<String> rewardCountsJson,
Value<String> difficultyCountsJson,
Value<String> reminderProfileCountsJson,
Value<int> revision,
Value<DateTime> createdAtUtc,
Value<DateTime> updatedAtUtc,
Value<int> rowid,
});
class $$ProjectStatisticsTableTableFilterComposer
extends Composer<_$SchedulerDb, $ProjectStatisticsTableTable> {
$$ProjectStatisticsTableTableFilterComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnFilters<String> get projectId => $composableBuilder(
column: $table.projectId, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnFilters(column));
ColumnFilters<int> get completedTaskCount => $composableBuilder(
column: $table.completedTaskCount,
builder: (column) => ColumnFilters(column));
ColumnFilters<String> get durationMinuteCountsJson => $composableBuilder(
column: $table.durationMinuteCountsJson,
builder: (column) => ColumnFilters(column));
ColumnFilters<String> get completionTimeBucketCountsJson =>
$composableBuilder(
column: $table.completionTimeBucketCountsJson,
builder: (column) => ColumnFilters(column));
ColumnFilters<int> get totalPushesBeforeCompletion => $composableBuilder(
column: $table.totalPushesBeforeCompletion,
builder: (column) => ColumnFilters(column));
ColumnFilters<int> get completedAfterPushCount => $composableBuilder(
column: $table.completedAfterPushCount,
builder: (column) => ColumnFilters(column));
ColumnFilters<String> get rewardCountsJson => $composableBuilder(
column: $table.rewardCountsJson,
builder: (column) => ColumnFilters(column));
ColumnFilters<String> get difficultyCountsJson => $composableBuilder(
column: $table.difficultyCountsJson,
builder: (column) => ColumnFilters(column));
ColumnFilters<String> get reminderProfileCountsJson => $composableBuilder(
column: $table.reminderProfileCountsJson,
builder: (column) => ColumnFilters(column));
ColumnFilters<int> get revision => $composableBuilder(
column: $table.revision, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc, builder: (column) => ColumnFilters(column));
}
class $$ProjectStatisticsTableTableOrderingComposer
extends Composer<_$SchedulerDb, $ProjectStatisticsTableTable> {
$$ProjectStatisticsTableTableOrderingComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnOrderings<String> get projectId => $composableBuilder(
column: $table.projectId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<int> get completedTaskCount => $composableBuilder(
column: $table.completedTaskCount,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get durationMinuteCountsJson => $composableBuilder(
column: $table.durationMinuteCountsJson,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get completionTimeBucketCountsJson =>
$composableBuilder(
column: $table.completionTimeBucketCountsJson,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<int> get totalPushesBeforeCompletion => $composableBuilder(
column: $table.totalPushesBeforeCompletion,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<int> get completedAfterPushCount => $composableBuilder(
column: $table.completedAfterPushCount,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get rewardCountsJson => $composableBuilder(
column: $table.rewardCountsJson,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get difficultyCountsJson => $composableBuilder(
column: $table.difficultyCountsJson,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get reminderProfileCountsJson => $composableBuilder(
column: $table.reminderProfileCountsJson,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<int> get revision => $composableBuilder(
column: $table.revision, builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc,
builder: (column) => ColumnOrderings(column));
}
class $$ProjectStatisticsTableTableAnnotationComposer
extends Composer<_$SchedulerDb, $ProjectStatisticsTableTable> {
$$ProjectStatisticsTableTableAnnotationComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<String> get projectId =>
$composableBuilder(column: $table.projectId, builder: (column) => column);
GeneratedColumn<String> get ownerId =>
$composableBuilder(column: $table.ownerId, builder: (column) => column);
GeneratedColumn<int> get completedTaskCount => $composableBuilder(
column: $table.completedTaskCount, builder: (column) => column);
GeneratedColumn<String> get durationMinuteCountsJson => $composableBuilder(
column: $table.durationMinuteCountsJson, builder: (column) => column);
GeneratedColumn<String> get completionTimeBucketCountsJson =>
$composableBuilder(
column: $table.completionTimeBucketCountsJson,
builder: (column) => column);
GeneratedColumn<int> get totalPushesBeforeCompletion => $composableBuilder(
column: $table.totalPushesBeforeCompletion, builder: (column) => column);
GeneratedColumn<int> get completedAfterPushCount => $composableBuilder(
column: $table.completedAfterPushCount, builder: (column) => column);
GeneratedColumn<String> get rewardCountsJson => $composableBuilder(
column: $table.rewardCountsJson, builder: (column) => column);
GeneratedColumn<String> get difficultyCountsJson => $composableBuilder(
column: $table.difficultyCountsJson, builder: (column) => column);
GeneratedColumn<String> get reminderProfileCountsJson => $composableBuilder(
column: $table.reminderProfileCountsJson, builder: (column) => column);
GeneratedColumn<int> get revision =>
$composableBuilder(column: $table.revision, builder: (column) => column);
GeneratedColumn<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc, builder: (column) => column);
GeneratedColumn<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc, builder: (column) => column);
}
class $$ProjectStatisticsTableTableTableManager extends RootTableManager<
_$SchedulerDb,
$ProjectStatisticsTableTable,
ProjectStatisticsRow,
$$ProjectStatisticsTableTableFilterComposer,
$$ProjectStatisticsTableTableOrderingComposer,
$$ProjectStatisticsTableTableAnnotationComposer,
$$ProjectStatisticsTableTableCreateCompanionBuilder,
$$ProjectStatisticsTableTableUpdateCompanionBuilder,
(
ProjectStatisticsRow,
BaseReferences<_$SchedulerDb, $ProjectStatisticsTableTable,
ProjectStatisticsRow>
),
ProjectStatisticsRow,
PrefetchHooks Function()> {
$$ProjectStatisticsTableTableTableManager(
_$SchedulerDb db, $ProjectStatisticsTableTable table)
: super(TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$ProjectStatisticsTableTableFilterComposer(
$db: db, $table: table),
createOrderingComposer: () =>
$$ProjectStatisticsTableTableOrderingComposer(
$db: db, $table: table),
createComputedFieldComposer: () =>
$$ProjectStatisticsTableTableAnnotationComposer(
$db: db, $table: table),
updateCompanionCallback: ({
Value<String> projectId = const Value.absent(),
Value<String> ownerId = const Value.absent(),
Value<int> completedTaskCount = const Value.absent(),
Value<String> durationMinuteCountsJson = const Value.absent(),
Value<String> completionTimeBucketCountsJson = const Value.absent(),
Value<int> totalPushesBeforeCompletion = const Value.absent(),
Value<int> completedAfterPushCount = const Value.absent(),
Value<String> rewardCountsJson = const Value.absent(),
Value<String> difficultyCountsJson = const Value.absent(),
Value<String> reminderProfileCountsJson = const Value.absent(),
Value<int> revision = const Value.absent(),
Value<DateTime> createdAtUtc = const Value.absent(),
Value<DateTime> updatedAtUtc = const Value.absent(),
Value<int> rowid = const Value.absent(),
}) =>
ProjectStatisticsTableCompanion(
projectId: projectId,
ownerId: ownerId,
completedTaskCount: completedTaskCount,
durationMinuteCountsJson: durationMinuteCountsJson,
completionTimeBucketCountsJson: completionTimeBucketCountsJson,
totalPushesBeforeCompletion: totalPushesBeforeCompletion,
completedAfterPushCount: completedAfterPushCount,
rewardCountsJson: rewardCountsJson,
difficultyCountsJson: difficultyCountsJson,
reminderProfileCountsJson: reminderProfileCountsJson,
revision: revision,
createdAtUtc: createdAtUtc,
updatedAtUtc: updatedAtUtc,
rowid: rowid,
),
createCompanionCallback: ({
required String projectId,
required String ownerId,
required int completedTaskCount,
required String durationMinuteCountsJson,
required String completionTimeBucketCountsJson,
required int totalPushesBeforeCompletion,
required int completedAfterPushCount,
required String rewardCountsJson,
required String difficultyCountsJson,
required String reminderProfileCountsJson,
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
Value<int> rowid = const Value.absent(),
}) =>
ProjectStatisticsTableCompanion.insert(
projectId: projectId,
ownerId: ownerId,
completedTaskCount: completedTaskCount,
durationMinuteCountsJson: durationMinuteCountsJson,
completionTimeBucketCountsJson: completionTimeBucketCountsJson,
totalPushesBeforeCompletion: totalPushesBeforeCompletion,
completedAfterPushCount: completedAfterPushCount,
rewardCountsJson: rewardCountsJson,
difficultyCountsJson: difficultyCountsJson,
reminderProfileCountsJson: reminderProfileCountsJson,
revision: revision,
createdAtUtc: createdAtUtc,
updatedAtUtc: updatedAtUtc,
rowid: rowid,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
));
}
typedef $$ProjectStatisticsTableTableProcessedTableManager
= ProcessedTableManager<
_$SchedulerDb,
$ProjectStatisticsTableTable,
ProjectStatisticsRow,
$$ProjectStatisticsTableTableFilterComposer,
$$ProjectStatisticsTableTableOrderingComposer,
$$ProjectStatisticsTableTableAnnotationComposer,
$$ProjectStatisticsTableTableCreateCompanionBuilder,
$$ProjectStatisticsTableTableUpdateCompanionBuilder,
(
ProjectStatisticsRow,
BaseReferences<_$SchedulerDb, $ProjectStatisticsTableTable,
ProjectStatisticsRow>
),
ProjectStatisticsRow,
PrefetchHooks Function()>;
typedef $$LockedBlocksTableCreateCompanionBuilder = LockedBlocksCompanion
Function({
required String id,
required String ownerId,
required String name,
Value<String?> date,
required String startTime,
required String endTime,
Value<String?> recurrenceJson,
required bool hiddenByDefault,
Value<String?> projectId,
Value<DateTime?> archivedAtUtc,
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
Value<int> rowid,
});
typedef $$LockedBlocksTableUpdateCompanionBuilder = LockedBlocksCompanion
Function({
Value<String> id,
Value<String> ownerId,
Value<String> name,
Value<String?> date,
Value<String> startTime,
Value<String> endTime,
Value<String?> recurrenceJson,
Value<bool> hiddenByDefault,
Value<String?> projectId,
Value<DateTime?> archivedAtUtc,
Value<int> revision,
Value<DateTime> createdAtUtc,
Value<DateTime> updatedAtUtc,
Value<int> rowid,
});
class $$LockedBlocksTableFilterComposer
extends Composer<_$SchedulerDb, $LockedBlocksTable> {
$$LockedBlocksTableFilterComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnFilters<String> get id => $composableBuilder(
column: $table.id, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get name => $composableBuilder(
column: $table.name, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get date => $composableBuilder(
column: $table.date, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get startTime => $composableBuilder(
column: $table.startTime, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get endTime => $composableBuilder(
column: $table.endTime, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get recurrenceJson => $composableBuilder(
column: $table.recurrenceJson,
builder: (column) => ColumnFilters(column));
ColumnFilters<bool> get hiddenByDefault => $composableBuilder(
column: $table.hiddenByDefault,
builder: (column) => ColumnFilters(column));
ColumnFilters<String> get projectId => $composableBuilder(
column: $table.projectId, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get archivedAtUtc => $composableBuilder(
column: $table.archivedAtUtc, builder: (column) => ColumnFilters(column));
ColumnFilters<int> get revision => $composableBuilder(
column: $table.revision, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc, builder: (column) => ColumnFilters(column));
}
class $$LockedBlocksTableOrderingComposer
extends Composer<_$SchedulerDb, $LockedBlocksTable> {
$$LockedBlocksTableOrderingComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnOrderings<String> get id => $composableBuilder(
column: $table.id, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get name => $composableBuilder(
column: $table.name, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get date => $composableBuilder(
column: $table.date, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get startTime => $composableBuilder(
column: $table.startTime, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get endTime => $composableBuilder(
column: $table.endTime, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get recurrenceJson => $composableBuilder(
column: $table.recurrenceJson,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<bool> get hiddenByDefault => $composableBuilder(
column: $table.hiddenByDefault,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get projectId => $composableBuilder(
column: $table.projectId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get archivedAtUtc => $composableBuilder(
column: $table.archivedAtUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<int> get revision => $composableBuilder(
column: $table.revision, builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc,
builder: (column) => ColumnOrderings(column));
}
class $$LockedBlocksTableAnnotationComposer
extends Composer<_$SchedulerDb, $LockedBlocksTable> {
$$LockedBlocksTableAnnotationComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<String> get id =>
$composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumn<String> get ownerId =>
$composableBuilder(column: $table.ownerId, builder: (column) => column);
GeneratedColumn<String> get name =>
$composableBuilder(column: $table.name, builder: (column) => column);
GeneratedColumn<String> get date =>
$composableBuilder(column: $table.date, builder: (column) => column);
GeneratedColumn<String> get startTime =>
$composableBuilder(column: $table.startTime, builder: (column) => column);
GeneratedColumn<String> get endTime =>
$composableBuilder(column: $table.endTime, builder: (column) => column);
GeneratedColumn<String> get recurrenceJson => $composableBuilder(
column: $table.recurrenceJson, builder: (column) => column);
GeneratedColumn<bool> get hiddenByDefault => $composableBuilder(
column: $table.hiddenByDefault, builder: (column) => column);
GeneratedColumn<String> get projectId =>
$composableBuilder(column: $table.projectId, builder: (column) => column);
GeneratedColumn<DateTime> get archivedAtUtc => $composableBuilder(
column: $table.archivedAtUtc, builder: (column) => column);
GeneratedColumn<int> get revision =>
$composableBuilder(column: $table.revision, builder: (column) => column);
GeneratedColumn<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc, builder: (column) => column);
GeneratedColumn<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc, builder: (column) => column);
}
class $$LockedBlocksTableTableManager extends RootTableManager<
_$SchedulerDb,
$LockedBlocksTable,
LockedBlockRow,
$$LockedBlocksTableFilterComposer,
$$LockedBlocksTableOrderingComposer,
$$LockedBlocksTableAnnotationComposer,
$$LockedBlocksTableCreateCompanionBuilder,
$$LockedBlocksTableUpdateCompanionBuilder,
(
LockedBlockRow,
BaseReferences<_$SchedulerDb, $LockedBlocksTable, LockedBlockRow>
),
LockedBlockRow,
PrefetchHooks Function()> {
$$LockedBlocksTableTableManager(_$SchedulerDb db, $LockedBlocksTable table)
: super(TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$LockedBlocksTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$LockedBlocksTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$LockedBlocksTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback: ({
Value<String> id = const Value.absent(),
Value<String> ownerId = const Value.absent(),
Value<String> name = const Value.absent(),
Value<String?> date = const Value.absent(),
Value<String> startTime = const Value.absent(),
Value<String> endTime = const Value.absent(),
Value<String?> recurrenceJson = const Value.absent(),
Value<bool> hiddenByDefault = const Value.absent(),
Value<String?> projectId = const Value.absent(),
Value<DateTime?> archivedAtUtc = const Value.absent(),
Value<int> revision = const Value.absent(),
Value<DateTime> createdAtUtc = const Value.absent(),
Value<DateTime> updatedAtUtc = const Value.absent(),
Value<int> rowid = const Value.absent(),
}) =>
LockedBlocksCompanion(
id: id,
ownerId: ownerId,
name: name,
date: date,
startTime: startTime,
endTime: endTime,
recurrenceJson: recurrenceJson,
hiddenByDefault: hiddenByDefault,
projectId: projectId,
archivedAtUtc: archivedAtUtc,
revision: revision,
createdAtUtc: createdAtUtc,
updatedAtUtc: updatedAtUtc,
rowid: rowid,
),
createCompanionCallback: ({
required String id,
required String ownerId,
required String name,
Value<String?> date = const Value.absent(),
required String startTime,
required String endTime,
Value<String?> recurrenceJson = const Value.absent(),
required bool hiddenByDefault,
Value<String?> projectId = const Value.absent(),
Value<DateTime?> archivedAtUtc = const Value.absent(),
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
Value<int> rowid = const Value.absent(),
}) =>
LockedBlocksCompanion.insert(
id: id,
ownerId: ownerId,
name: name,
date: date,
startTime: startTime,
endTime: endTime,
recurrenceJson: recurrenceJson,
hiddenByDefault: hiddenByDefault,
projectId: projectId,
archivedAtUtc: archivedAtUtc,
revision: revision,
createdAtUtc: createdAtUtc,
updatedAtUtc: updatedAtUtc,
rowid: rowid,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
));
}
typedef $$LockedBlocksTableProcessedTableManager = ProcessedTableManager<
_$SchedulerDb,
$LockedBlocksTable,
LockedBlockRow,
$$LockedBlocksTableFilterComposer,
$$LockedBlocksTableOrderingComposer,
$$LockedBlocksTableAnnotationComposer,
$$LockedBlocksTableCreateCompanionBuilder,
$$LockedBlocksTableUpdateCompanionBuilder,
(
LockedBlockRow,
BaseReferences<_$SchedulerDb, $LockedBlocksTable, LockedBlockRow>
),
LockedBlockRow,
PrefetchHooks Function()>;
typedef $$LockedOverridesTableCreateCompanionBuilder = LockedOverridesCompanion
Function({
required String id,
required String ownerId,
Value<String?> lockedBlockId,
required String date,
required String type,
Value<String?> name,
Value<String?> startTime,
Value<String?> endTime,
required bool hiddenByDefault,
Value<String?> projectId,
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
Value<int> rowid,
});
typedef $$LockedOverridesTableUpdateCompanionBuilder = LockedOverridesCompanion
Function({
Value<String> id,
Value<String> ownerId,
Value<String?> lockedBlockId,
Value<String> date,
Value<String> type,
Value<String?> name,
Value<String?> startTime,
Value<String?> endTime,
Value<bool> hiddenByDefault,
Value<String?> projectId,
Value<int> revision,
Value<DateTime> createdAtUtc,
Value<DateTime> updatedAtUtc,
Value<int> rowid,
});
class $$LockedOverridesTableFilterComposer
extends Composer<_$SchedulerDb, $LockedOverridesTable> {
$$LockedOverridesTableFilterComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnFilters<String> get id => $composableBuilder(
column: $table.id, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get lockedBlockId => $composableBuilder(
column: $table.lockedBlockId, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get date => $composableBuilder(
column: $table.date, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get type => $composableBuilder(
column: $table.type, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get name => $composableBuilder(
column: $table.name, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get startTime => $composableBuilder(
column: $table.startTime, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get endTime => $composableBuilder(
column: $table.endTime, builder: (column) => ColumnFilters(column));
ColumnFilters<bool> get hiddenByDefault => $composableBuilder(
column: $table.hiddenByDefault,
builder: (column) => ColumnFilters(column));
ColumnFilters<String> get projectId => $composableBuilder(
column: $table.projectId, builder: (column) => ColumnFilters(column));
ColumnFilters<int> get revision => $composableBuilder(
column: $table.revision, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc, builder: (column) => ColumnFilters(column));
}
class $$LockedOverridesTableOrderingComposer
extends Composer<_$SchedulerDb, $LockedOverridesTable> {
$$LockedOverridesTableOrderingComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnOrderings<String> get id => $composableBuilder(
column: $table.id, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get lockedBlockId => $composableBuilder(
column: $table.lockedBlockId,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get date => $composableBuilder(
column: $table.date, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get type => $composableBuilder(
column: $table.type, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get name => $composableBuilder(
column: $table.name, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get startTime => $composableBuilder(
column: $table.startTime, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get endTime => $composableBuilder(
column: $table.endTime, builder: (column) => ColumnOrderings(column));
ColumnOrderings<bool> get hiddenByDefault => $composableBuilder(
column: $table.hiddenByDefault,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get projectId => $composableBuilder(
column: $table.projectId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<int> get revision => $composableBuilder(
column: $table.revision, builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc,
builder: (column) => ColumnOrderings(column));
}
class $$LockedOverridesTableAnnotationComposer
extends Composer<_$SchedulerDb, $LockedOverridesTable> {
$$LockedOverridesTableAnnotationComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<String> get id =>
$composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumn<String> get ownerId =>
$composableBuilder(column: $table.ownerId, builder: (column) => column);
GeneratedColumn<String> get lockedBlockId => $composableBuilder(
column: $table.lockedBlockId, builder: (column) => column);
GeneratedColumn<String> get date =>
$composableBuilder(column: $table.date, builder: (column) => column);
GeneratedColumn<String> get type =>
$composableBuilder(column: $table.type, builder: (column) => column);
GeneratedColumn<String> get name =>
$composableBuilder(column: $table.name, builder: (column) => column);
GeneratedColumn<String> get startTime =>
$composableBuilder(column: $table.startTime, builder: (column) => column);
GeneratedColumn<String> get endTime =>
$composableBuilder(column: $table.endTime, builder: (column) => column);
GeneratedColumn<bool> get hiddenByDefault => $composableBuilder(
column: $table.hiddenByDefault, builder: (column) => column);
GeneratedColumn<String> get projectId =>
$composableBuilder(column: $table.projectId, builder: (column) => column);
GeneratedColumn<int> get revision =>
$composableBuilder(column: $table.revision, builder: (column) => column);
GeneratedColumn<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc, builder: (column) => column);
GeneratedColumn<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc, builder: (column) => column);
}
class $$LockedOverridesTableTableManager extends RootTableManager<
_$SchedulerDb,
$LockedOverridesTable,
LockedOverrideRow,
$$LockedOverridesTableFilterComposer,
$$LockedOverridesTableOrderingComposer,
$$LockedOverridesTableAnnotationComposer,
$$LockedOverridesTableCreateCompanionBuilder,
$$LockedOverridesTableUpdateCompanionBuilder,
(
LockedOverrideRow,
BaseReferences<_$SchedulerDb, $LockedOverridesTable, LockedOverrideRow>
),
LockedOverrideRow,
PrefetchHooks Function()> {
$$LockedOverridesTableTableManager(
_$SchedulerDb db, $LockedOverridesTable table)
: super(TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$LockedOverridesTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$LockedOverridesTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$LockedOverridesTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback: ({
Value<String> id = const Value.absent(),
Value<String> ownerId = const Value.absent(),
Value<String?> lockedBlockId = const Value.absent(),
Value<String> date = const Value.absent(),
Value<String> type = const Value.absent(),
Value<String?> name = const Value.absent(),
Value<String?> startTime = const Value.absent(),
Value<String?> endTime = const Value.absent(),
Value<bool> hiddenByDefault = const Value.absent(),
Value<String?> projectId = const Value.absent(),
Value<int> revision = const Value.absent(),
Value<DateTime> createdAtUtc = const Value.absent(),
Value<DateTime> updatedAtUtc = const Value.absent(),
Value<int> rowid = const Value.absent(),
}) =>
LockedOverridesCompanion(
id: id,
ownerId: ownerId,
lockedBlockId: lockedBlockId,
date: date,
type: type,
name: name,
startTime: startTime,
endTime: endTime,
hiddenByDefault: hiddenByDefault,
projectId: projectId,
revision: revision,
createdAtUtc: createdAtUtc,
updatedAtUtc: updatedAtUtc,
rowid: rowid,
),
createCompanionCallback: ({
required String id,
required String ownerId,
Value<String?> lockedBlockId = const Value.absent(),
required String date,
required String type,
Value<String?> name = const Value.absent(),
Value<String?> startTime = const Value.absent(),
Value<String?> endTime = const Value.absent(),
required bool hiddenByDefault,
Value<String?> projectId = const Value.absent(),
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
Value<int> rowid = const Value.absent(),
}) =>
LockedOverridesCompanion.insert(
id: id,
ownerId: ownerId,
lockedBlockId: lockedBlockId,
date: date,
type: type,
name: name,
startTime: startTime,
endTime: endTime,
hiddenByDefault: hiddenByDefault,
projectId: projectId,
revision: revision,
createdAtUtc: createdAtUtc,
updatedAtUtc: updatedAtUtc,
rowid: rowid,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
));
}
typedef $$LockedOverridesTableProcessedTableManager = ProcessedTableManager<
_$SchedulerDb,
$LockedOverridesTable,
LockedOverrideRow,
$$LockedOverridesTableFilterComposer,
$$LockedOverridesTableOrderingComposer,
$$LockedOverridesTableAnnotationComposer,
$$LockedOverridesTableCreateCompanionBuilder,
$$LockedOverridesTableUpdateCompanionBuilder,
(
LockedOverrideRow,
BaseReferences<_$SchedulerDb, $LockedOverridesTable, LockedOverrideRow>
),
LockedOverrideRow,
PrefetchHooks Function()>;
typedef $$SettingsTableTableCreateCompanionBuilder = SettingsTableCompanion
Function({
required String ownerId,
required String timeZoneId,
required int dayStartMinutes,
required int dayEndMinutes,
required bool compactMode,
required String backlogStalenessJson,
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
Value<int> rowid,
});
typedef $$SettingsTableTableUpdateCompanionBuilder = SettingsTableCompanion
Function({
Value<String> ownerId,
Value<String> timeZoneId,
Value<int> dayStartMinutes,
Value<int> dayEndMinutes,
Value<bool> compactMode,
Value<String> backlogStalenessJson,
Value<int> revision,
Value<DateTime> createdAtUtc,
Value<DateTime> updatedAtUtc,
Value<int> rowid,
});
class $$SettingsTableTableFilterComposer
extends Composer<_$SchedulerDb, $SettingsTableTable> {
$$SettingsTableTableFilterComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnFilters<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get timeZoneId => $composableBuilder(
column: $table.timeZoneId, builder: (column) => ColumnFilters(column));
ColumnFilters<int> get dayStartMinutes => $composableBuilder(
column: $table.dayStartMinutes,
builder: (column) => ColumnFilters(column));
ColumnFilters<int> get dayEndMinutes => $composableBuilder(
column: $table.dayEndMinutes, builder: (column) => ColumnFilters(column));
ColumnFilters<bool> get compactMode => $composableBuilder(
column: $table.compactMode, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get backlogStalenessJson => $composableBuilder(
column: $table.backlogStalenessJson,
builder: (column) => ColumnFilters(column));
ColumnFilters<int> get revision => $composableBuilder(
column: $table.revision, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc, builder: (column) => ColumnFilters(column));
}
class $$SettingsTableTableOrderingComposer
extends Composer<_$SchedulerDb, $SettingsTableTable> {
$$SettingsTableTableOrderingComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnOrderings<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get timeZoneId => $composableBuilder(
column: $table.timeZoneId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<int> get dayStartMinutes => $composableBuilder(
column: $table.dayStartMinutes,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<int> get dayEndMinutes => $composableBuilder(
column: $table.dayEndMinutes,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<bool> get compactMode => $composableBuilder(
column: $table.compactMode, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get backlogStalenessJson => $composableBuilder(
column: $table.backlogStalenessJson,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<int> get revision => $composableBuilder(
column: $table.revision, builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc,
builder: (column) => ColumnOrderings(column));
}
class $$SettingsTableTableAnnotationComposer
extends Composer<_$SchedulerDb, $SettingsTableTable> {
$$SettingsTableTableAnnotationComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<String> get ownerId =>
$composableBuilder(column: $table.ownerId, builder: (column) => column);
GeneratedColumn<String> get timeZoneId => $composableBuilder(
column: $table.timeZoneId, builder: (column) => column);
GeneratedColumn<int> get dayStartMinutes => $composableBuilder(
column: $table.dayStartMinutes, builder: (column) => column);
GeneratedColumn<int> get dayEndMinutes => $composableBuilder(
column: $table.dayEndMinutes, builder: (column) => column);
GeneratedColumn<bool> get compactMode => $composableBuilder(
column: $table.compactMode, builder: (column) => column);
GeneratedColumn<String> get backlogStalenessJson => $composableBuilder(
column: $table.backlogStalenessJson, builder: (column) => column);
GeneratedColumn<int> get revision =>
$composableBuilder(column: $table.revision, builder: (column) => column);
GeneratedColumn<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc, builder: (column) => column);
GeneratedColumn<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc, builder: (column) => column);
}
class $$SettingsTableTableTableManager extends RootTableManager<
_$SchedulerDb,
$SettingsTableTable,
SettingsRow,
$$SettingsTableTableFilterComposer,
$$SettingsTableTableOrderingComposer,
$$SettingsTableTableAnnotationComposer,
$$SettingsTableTableCreateCompanionBuilder,
$$SettingsTableTableUpdateCompanionBuilder,
(
SettingsRow,
BaseReferences<_$SchedulerDb, $SettingsTableTable, SettingsRow>
),
SettingsRow,
PrefetchHooks Function()> {
$$SettingsTableTableTableManager(_$SchedulerDb db, $SettingsTableTable table)
: super(TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$SettingsTableTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$SettingsTableTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$SettingsTableTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback: ({
Value<String> ownerId = const Value.absent(),
Value<String> timeZoneId = const Value.absent(),
Value<int> dayStartMinutes = const Value.absent(),
Value<int> dayEndMinutes = const Value.absent(),
Value<bool> compactMode = const Value.absent(),
Value<String> backlogStalenessJson = const Value.absent(),
Value<int> revision = const Value.absent(),
Value<DateTime> createdAtUtc = const Value.absent(),
Value<DateTime> updatedAtUtc = const Value.absent(),
Value<int> rowid = const Value.absent(),
}) =>
SettingsTableCompanion(
ownerId: ownerId,
timeZoneId: timeZoneId,
dayStartMinutes: dayStartMinutes,
dayEndMinutes: dayEndMinutes,
compactMode: compactMode,
backlogStalenessJson: backlogStalenessJson,
revision: revision,
createdAtUtc: createdAtUtc,
updatedAtUtc: updatedAtUtc,
rowid: rowid,
),
createCompanionCallback: ({
required String ownerId,
required String timeZoneId,
required int dayStartMinutes,
required int dayEndMinutes,
required bool compactMode,
required String backlogStalenessJson,
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
Value<int> rowid = const Value.absent(),
}) =>
SettingsTableCompanion.insert(
ownerId: ownerId,
timeZoneId: timeZoneId,
dayStartMinutes: dayStartMinutes,
dayEndMinutes: dayEndMinutes,
compactMode: compactMode,
backlogStalenessJson: backlogStalenessJson,
revision: revision,
createdAtUtc: createdAtUtc,
updatedAtUtc: updatedAtUtc,
rowid: rowid,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
));
}
typedef $$SettingsTableTableProcessedTableManager = ProcessedTableManager<
_$SchedulerDb,
$SettingsTableTable,
SettingsRow,
$$SettingsTableTableFilterComposer,
$$SettingsTableTableOrderingComposer,
$$SettingsTableTableAnnotationComposer,
$$SettingsTableTableCreateCompanionBuilder,
$$SettingsTableTableUpdateCompanionBuilder,
(
SettingsRow,
BaseReferences<_$SchedulerDb, $SettingsTableTable, SettingsRow>
),
SettingsRow,
PrefetchHooks Function()>;
typedef $$SnapshotsTableCreateCompanionBuilder = SnapshotsCompanion Function({
required String id,
required String ownerId,
required DateTime capturedAtUtc,
Value<String?> operationName,
Value<String?> sourceDate,
Value<String?> targetDate,
required String windowJson,
required String tasksJson,
required String lockedIntervalsJson,
required String requiredVisibleIntervalsJson,
required String noticesJson,
required String changesJson,
required String overlapsJson,
required DateTime retentionExpiresUtc,
required bool truncated,
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
Value<int> rowid,
});
typedef $$SnapshotsTableUpdateCompanionBuilder = SnapshotsCompanion Function({
Value<String> id,
Value<String> ownerId,
Value<DateTime> capturedAtUtc,
Value<String?> operationName,
Value<String?> sourceDate,
Value<String?> targetDate,
Value<String> windowJson,
Value<String> tasksJson,
Value<String> lockedIntervalsJson,
Value<String> requiredVisibleIntervalsJson,
Value<String> noticesJson,
Value<String> changesJson,
Value<String> overlapsJson,
Value<DateTime> retentionExpiresUtc,
Value<bool> truncated,
Value<int> revision,
Value<DateTime> createdAtUtc,
Value<DateTime> updatedAtUtc,
Value<int> rowid,
});
class $$SnapshotsTableFilterComposer
extends Composer<_$SchedulerDb, $SnapshotsTable> {
$$SnapshotsTableFilterComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnFilters<String> get id => $composableBuilder(
column: $table.id, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get capturedAtUtc => $composableBuilder(
column: $table.capturedAtUtc, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get operationName => $composableBuilder(
column: $table.operationName, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get sourceDate => $composableBuilder(
column: $table.sourceDate, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get targetDate => $composableBuilder(
column: $table.targetDate, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get windowJson => $composableBuilder(
column: $table.windowJson, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get tasksJson => $composableBuilder(
column: $table.tasksJson, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get lockedIntervalsJson => $composableBuilder(
column: $table.lockedIntervalsJson,
builder: (column) => ColumnFilters(column));
ColumnFilters<String> get requiredVisibleIntervalsJson => $composableBuilder(
column: $table.requiredVisibleIntervalsJson,
builder: (column) => ColumnFilters(column));
ColumnFilters<String> get noticesJson => $composableBuilder(
column: $table.noticesJson, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get changesJson => $composableBuilder(
column: $table.changesJson, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get overlapsJson => $composableBuilder(
column: $table.overlapsJson, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get retentionExpiresUtc => $composableBuilder(
column: $table.retentionExpiresUtc,
builder: (column) => ColumnFilters(column));
ColumnFilters<bool> get truncated => $composableBuilder(
column: $table.truncated, builder: (column) => ColumnFilters(column));
ColumnFilters<int> get revision => $composableBuilder(
column: $table.revision, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc, builder: (column) => ColumnFilters(column));
}
class $$SnapshotsTableOrderingComposer
extends Composer<_$SchedulerDb, $SnapshotsTable> {
$$SnapshotsTableOrderingComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnOrderings<String> get id => $composableBuilder(
column: $table.id, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get capturedAtUtc => $composableBuilder(
column: $table.capturedAtUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get operationName => $composableBuilder(
column: $table.operationName,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get sourceDate => $composableBuilder(
column: $table.sourceDate, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get targetDate => $composableBuilder(
column: $table.targetDate, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get windowJson => $composableBuilder(
column: $table.windowJson, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get tasksJson => $composableBuilder(
column: $table.tasksJson, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get lockedIntervalsJson => $composableBuilder(
column: $table.lockedIntervalsJson,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get requiredVisibleIntervalsJson =>
$composableBuilder(
column: $table.requiredVisibleIntervalsJson,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get noticesJson => $composableBuilder(
column: $table.noticesJson, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get changesJson => $composableBuilder(
column: $table.changesJson, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get overlapsJson => $composableBuilder(
column: $table.overlapsJson,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get retentionExpiresUtc => $composableBuilder(
column: $table.retentionExpiresUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<bool> get truncated => $composableBuilder(
column: $table.truncated, builder: (column) => ColumnOrderings(column));
ColumnOrderings<int> get revision => $composableBuilder(
column: $table.revision, builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc,
builder: (column) => ColumnOrderings(column));
}
class $$SnapshotsTableAnnotationComposer
extends Composer<_$SchedulerDb, $SnapshotsTable> {
$$SnapshotsTableAnnotationComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<String> get id =>
$composableBuilder(column: $table.id, builder: (column) => column);
GeneratedColumn<String> get ownerId =>
$composableBuilder(column: $table.ownerId, builder: (column) => column);
GeneratedColumn<DateTime> get capturedAtUtc => $composableBuilder(
column: $table.capturedAtUtc, builder: (column) => column);
GeneratedColumn<String> get operationName => $composableBuilder(
column: $table.operationName, builder: (column) => column);
GeneratedColumn<String> get sourceDate => $composableBuilder(
column: $table.sourceDate, builder: (column) => column);
GeneratedColumn<String> get targetDate => $composableBuilder(
column: $table.targetDate, builder: (column) => column);
GeneratedColumn<String> get windowJson => $composableBuilder(
column: $table.windowJson, builder: (column) => column);
GeneratedColumn<String> get tasksJson =>
$composableBuilder(column: $table.tasksJson, builder: (column) => column);
GeneratedColumn<String> get lockedIntervalsJson => $composableBuilder(
column: $table.lockedIntervalsJson, builder: (column) => column);
GeneratedColumn<String> get requiredVisibleIntervalsJson =>
$composableBuilder(
column: $table.requiredVisibleIntervalsJson,
builder: (column) => column);
GeneratedColumn<String> get noticesJson => $composableBuilder(
column: $table.noticesJson, builder: (column) => column);
GeneratedColumn<String> get changesJson => $composableBuilder(
column: $table.changesJson, builder: (column) => column);
GeneratedColumn<String> get overlapsJson => $composableBuilder(
column: $table.overlapsJson, builder: (column) => column);
GeneratedColumn<DateTime> get retentionExpiresUtc => $composableBuilder(
column: $table.retentionExpiresUtc, builder: (column) => column);
GeneratedColumn<bool> get truncated =>
$composableBuilder(column: $table.truncated, builder: (column) => column);
GeneratedColumn<int> get revision =>
$composableBuilder(column: $table.revision, builder: (column) => column);
GeneratedColumn<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc, builder: (column) => column);
GeneratedColumn<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc, builder: (column) => column);
}
class $$SnapshotsTableTableManager extends RootTableManager<
_$SchedulerDb,
$SnapshotsTable,
SnapshotRow,
$$SnapshotsTableFilterComposer,
$$SnapshotsTableOrderingComposer,
$$SnapshotsTableAnnotationComposer,
$$SnapshotsTableCreateCompanionBuilder,
$$SnapshotsTableUpdateCompanionBuilder,
(SnapshotRow, BaseReferences<_$SchedulerDb, $SnapshotsTable, SnapshotRow>),
SnapshotRow,
PrefetchHooks Function()> {
$$SnapshotsTableTableManager(_$SchedulerDb db, $SnapshotsTable table)
: super(TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$SnapshotsTableFilterComposer($db: db, $table: table),
createOrderingComposer: () =>
$$SnapshotsTableOrderingComposer($db: db, $table: table),
createComputedFieldComposer: () =>
$$SnapshotsTableAnnotationComposer($db: db, $table: table),
updateCompanionCallback: ({
Value<String> id = const Value.absent(),
Value<String> ownerId = const Value.absent(),
Value<DateTime> capturedAtUtc = const Value.absent(),
Value<String?> operationName = const Value.absent(),
Value<String?> sourceDate = const Value.absent(),
Value<String?> targetDate = const Value.absent(),
Value<String> windowJson = const Value.absent(),
Value<String> tasksJson = const Value.absent(),
Value<String> lockedIntervalsJson = const Value.absent(),
Value<String> requiredVisibleIntervalsJson = const Value.absent(),
Value<String> noticesJson = const Value.absent(),
Value<String> changesJson = const Value.absent(),
Value<String> overlapsJson = const Value.absent(),
Value<DateTime> retentionExpiresUtc = const Value.absent(),
Value<bool> truncated = const Value.absent(),
Value<int> revision = const Value.absent(),
Value<DateTime> createdAtUtc = const Value.absent(),
Value<DateTime> updatedAtUtc = const Value.absent(),
Value<int> rowid = const Value.absent(),
}) =>
SnapshotsCompanion(
id: id,
ownerId: ownerId,
capturedAtUtc: capturedAtUtc,
operationName: operationName,
sourceDate: sourceDate,
targetDate: targetDate,
windowJson: windowJson,
tasksJson: tasksJson,
lockedIntervalsJson: lockedIntervalsJson,
requiredVisibleIntervalsJson: requiredVisibleIntervalsJson,
noticesJson: noticesJson,
changesJson: changesJson,
overlapsJson: overlapsJson,
retentionExpiresUtc: retentionExpiresUtc,
truncated: truncated,
revision: revision,
createdAtUtc: createdAtUtc,
updatedAtUtc: updatedAtUtc,
rowid: rowid,
),
createCompanionCallback: ({
required String id,
required String ownerId,
required DateTime capturedAtUtc,
Value<String?> operationName = const Value.absent(),
Value<String?> sourceDate = const Value.absent(),
Value<String?> targetDate = const Value.absent(),
required String windowJson,
required String tasksJson,
required String lockedIntervalsJson,
required String requiredVisibleIntervalsJson,
required String noticesJson,
required String changesJson,
required String overlapsJson,
required DateTime retentionExpiresUtc,
required bool truncated,
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
Value<int> rowid = const Value.absent(),
}) =>
SnapshotsCompanion.insert(
id: id,
ownerId: ownerId,
capturedAtUtc: capturedAtUtc,
operationName: operationName,
sourceDate: sourceDate,
targetDate: targetDate,
windowJson: windowJson,
tasksJson: tasksJson,
lockedIntervalsJson: lockedIntervalsJson,
requiredVisibleIntervalsJson: requiredVisibleIntervalsJson,
noticesJson: noticesJson,
changesJson: changesJson,
overlapsJson: overlapsJson,
retentionExpiresUtc: retentionExpiresUtc,
truncated: truncated,
revision: revision,
createdAtUtc: createdAtUtc,
updatedAtUtc: updatedAtUtc,
rowid: rowid,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
));
}
typedef $$SnapshotsTableProcessedTableManager = ProcessedTableManager<
_$SchedulerDb,
$SnapshotsTable,
SnapshotRow,
$$SnapshotsTableFilterComposer,
$$SnapshotsTableOrderingComposer,
$$SnapshotsTableAnnotationComposer,
$$SnapshotsTableCreateCompanionBuilder,
$$SnapshotsTableUpdateCompanionBuilder,
(SnapshotRow, BaseReferences<_$SchedulerDb, $SnapshotsTable, SnapshotRow>),
SnapshotRow,
PrefetchHooks Function()>;
typedef $$ApplicationOperationsTableCreateCompanionBuilder
= ApplicationOperationsCompanion Function({
required String operationId,
required String ownerId,
required String operationName,
required DateTime committedAtUtc,
Value<int> rowid,
});
typedef $$ApplicationOperationsTableUpdateCompanionBuilder
= ApplicationOperationsCompanion Function({
Value<String> operationId,
Value<String> ownerId,
Value<String> operationName,
Value<DateTime> committedAtUtc,
Value<int> rowid,
});
class $$ApplicationOperationsTableFilterComposer
extends Composer<_$SchedulerDb, $ApplicationOperationsTable> {
$$ApplicationOperationsTableFilterComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnFilters<String> get operationId => $composableBuilder(
column: $table.operationId, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get operationName => $composableBuilder(
column: $table.operationName, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get committedAtUtc => $composableBuilder(
column: $table.committedAtUtc,
builder: (column) => ColumnFilters(column));
}
class $$ApplicationOperationsTableOrderingComposer
extends Composer<_$SchedulerDb, $ApplicationOperationsTable> {
$$ApplicationOperationsTableOrderingComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnOrderings<String> get operationId => $composableBuilder(
column: $table.operationId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get operationName => $composableBuilder(
column: $table.operationName,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get committedAtUtc => $composableBuilder(
column: $table.committedAtUtc,
builder: (column) => ColumnOrderings(column));
}
class $$ApplicationOperationsTableAnnotationComposer
extends Composer<_$SchedulerDb, $ApplicationOperationsTable> {
$$ApplicationOperationsTableAnnotationComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<String> get operationId => $composableBuilder(
column: $table.operationId, builder: (column) => column);
GeneratedColumn<String> get ownerId =>
$composableBuilder(column: $table.ownerId, builder: (column) => column);
GeneratedColumn<String> get operationName => $composableBuilder(
column: $table.operationName, builder: (column) => column);
GeneratedColumn<DateTime> get committedAtUtc => $composableBuilder(
column: $table.committedAtUtc, builder: (column) => column);
}
class $$ApplicationOperationsTableTableManager extends RootTableManager<
_$SchedulerDb,
$ApplicationOperationsTable,
ApplicationOperationRow,
$$ApplicationOperationsTableFilterComposer,
$$ApplicationOperationsTableOrderingComposer,
$$ApplicationOperationsTableAnnotationComposer,
$$ApplicationOperationsTableCreateCompanionBuilder,
$$ApplicationOperationsTableUpdateCompanionBuilder,
(
ApplicationOperationRow,
BaseReferences<_$SchedulerDb, $ApplicationOperationsTable,
ApplicationOperationRow>
),
ApplicationOperationRow,
PrefetchHooks Function()> {
$$ApplicationOperationsTableTableManager(
_$SchedulerDb db, $ApplicationOperationsTable table)
: super(TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$ApplicationOperationsTableFilterComposer(
$db: db, $table: table),
createOrderingComposer: () =>
$$ApplicationOperationsTableOrderingComposer(
$db: db, $table: table),
createComputedFieldComposer: () =>
$$ApplicationOperationsTableAnnotationComposer(
$db: db, $table: table),
updateCompanionCallback: ({
Value<String> operationId = const Value.absent(),
Value<String> ownerId = const Value.absent(),
Value<String> operationName = const Value.absent(),
Value<DateTime> committedAtUtc = const Value.absent(),
Value<int> rowid = const Value.absent(),
}) =>
ApplicationOperationsCompanion(
operationId: operationId,
ownerId: ownerId,
operationName: operationName,
committedAtUtc: committedAtUtc,
rowid: rowid,
),
createCompanionCallback: ({
required String operationId,
required String ownerId,
required String operationName,
required DateTime committedAtUtc,
Value<int> rowid = const Value.absent(),
}) =>
ApplicationOperationsCompanion.insert(
operationId: operationId,
ownerId: ownerId,
operationName: operationName,
committedAtUtc: committedAtUtc,
rowid: rowid,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
));
}
typedef $$ApplicationOperationsTableProcessedTableManager
= ProcessedTableManager<
_$SchedulerDb,
$ApplicationOperationsTable,
ApplicationOperationRow,
$$ApplicationOperationsTableFilterComposer,
$$ApplicationOperationsTableOrderingComposer,
$$ApplicationOperationsTableAnnotationComposer,
$$ApplicationOperationsTableCreateCompanionBuilder,
$$ApplicationOperationsTableUpdateCompanionBuilder,
(
ApplicationOperationRow,
BaseReferences<_$SchedulerDb, $ApplicationOperationsTable,
ApplicationOperationRow>
),
ApplicationOperationRow,
PrefetchHooks Function()>;
typedef $$NoticeAcknowledgementsTableCreateCompanionBuilder
= NoticeAcknowledgementsCompanion Function({
required String ownerId,
required String noticeId,
required DateTime acknowledgedAtUtc,
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
Value<int> rowid,
});
typedef $$NoticeAcknowledgementsTableUpdateCompanionBuilder
= NoticeAcknowledgementsCompanion Function({
Value<String> ownerId,
Value<String> noticeId,
Value<DateTime> acknowledgedAtUtc,
Value<int> revision,
Value<DateTime> createdAtUtc,
Value<DateTime> updatedAtUtc,
Value<int> rowid,
});
class $$NoticeAcknowledgementsTableFilterComposer
extends Composer<_$SchedulerDb, $NoticeAcknowledgementsTable> {
$$NoticeAcknowledgementsTableFilterComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnFilters<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnFilters(column));
ColumnFilters<String> get noticeId => $composableBuilder(
column: $table.noticeId, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get acknowledgedAtUtc => $composableBuilder(
column: $table.acknowledgedAtUtc,
builder: (column) => ColumnFilters(column));
ColumnFilters<int> get revision => $composableBuilder(
column: $table.revision, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc, builder: (column) => ColumnFilters(column));
ColumnFilters<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc, builder: (column) => ColumnFilters(column));
}
class $$NoticeAcknowledgementsTableOrderingComposer
extends Composer<_$SchedulerDb, $NoticeAcknowledgementsTable> {
$$NoticeAcknowledgementsTableOrderingComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
ColumnOrderings<String> get ownerId => $composableBuilder(
column: $table.ownerId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<String> get noticeId => $composableBuilder(
column: $table.noticeId, builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get acknowledgedAtUtc => $composableBuilder(
column: $table.acknowledgedAtUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<int> get revision => $composableBuilder(
column: $table.revision, builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc,
builder: (column) => ColumnOrderings(column));
ColumnOrderings<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc,
builder: (column) => ColumnOrderings(column));
}
class $$NoticeAcknowledgementsTableAnnotationComposer
extends Composer<_$SchedulerDb, $NoticeAcknowledgementsTable> {
$$NoticeAcknowledgementsTableAnnotationComposer({
required super.$db,
required super.$table,
super.joinBuilder,
super.$addJoinBuilderToRootComposer,
super.$removeJoinBuilderFromRootComposer,
});
GeneratedColumn<String> get ownerId =>
$composableBuilder(column: $table.ownerId, builder: (column) => column);
GeneratedColumn<String> get noticeId =>
$composableBuilder(column: $table.noticeId, builder: (column) => column);
GeneratedColumn<DateTime> get acknowledgedAtUtc => $composableBuilder(
column: $table.acknowledgedAtUtc, builder: (column) => column);
GeneratedColumn<int> get revision =>
$composableBuilder(column: $table.revision, builder: (column) => column);
GeneratedColumn<DateTime> get createdAtUtc => $composableBuilder(
column: $table.createdAtUtc, builder: (column) => column);
GeneratedColumn<DateTime> get updatedAtUtc => $composableBuilder(
column: $table.updatedAtUtc, builder: (column) => column);
}
class $$NoticeAcknowledgementsTableTableManager extends RootTableManager<
_$SchedulerDb,
$NoticeAcknowledgementsTable,
NoticeAcknowledgementRow,
$$NoticeAcknowledgementsTableFilterComposer,
$$NoticeAcknowledgementsTableOrderingComposer,
$$NoticeAcknowledgementsTableAnnotationComposer,
$$NoticeAcknowledgementsTableCreateCompanionBuilder,
$$NoticeAcknowledgementsTableUpdateCompanionBuilder,
(
NoticeAcknowledgementRow,
BaseReferences<_$SchedulerDb, $NoticeAcknowledgementsTable,
NoticeAcknowledgementRow>
),
NoticeAcknowledgementRow,
PrefetchHooks Function()> {
$$NoticeAcknowledgementsTableTableManager(
_$SchedulerDb db, $NoticeAcknowledgementsTable table)
: super(TableManagerState(
db: db,
table: table,
createFilteringComposer: () =>
$$NoticeAcknowledgementsTableFilterComposer(
$db: db, $table: table),
createOrderingComposer: () =>
$$NoticeAcknowledgementsTableOrderingComposer(
$db: db, $table: table),
createComputedFieldComposer: () =>
$$NoticeAcknowledgementsTableAnnotationComposer(
$db: db, $table: table),
updateCompanionCallback: ({
Value<String> ownerId = const Value.absent(),
Value<String> noticeId = const Value.absent(),
Value<DateTime> acknowledgedAtUtc = const Value.absent(),
Value<int> revision = const Value.absent(),
Value<DateTime> createdAtUtc = const Value.absent(),
Value<DateTime> updatedAtUtc = const Value.absent(),
Value<int> rowid = const Value.absent(),
}) =>
NoticeAcknowledgementsCompanion(
ownerId: ownerId,
noticeId: noticeId,
acknowledgedAtUtc: acknowledgedAtUtc,
revision: revision,
createdAtUtc: createdAtUtc,
updatedAtUtc: updatedAtUtc,
rowid: rowid,
),
createCompanionCallback: ({
required String ownerId,
required String noticeId,
required DateTime acknowledgedAtUtc,
required int revision,
required DateTime createdAtUtc,
required DateTime updatedAtUtc,
Value<int> rowid = const Value.absent(),
}) =>
NoticeAcknowledgementsCompanion.insert(
ownerId: ownerId,
noticeId: noticeId,
acknowledgedAtUtc: acknowledgedAtUtc,
revision: revision,
createdAtUtc: createdAtUtc,
updatedAtUtc: updatedAtUtc,
rowid: rowid,
),
withReferenceMapper: (p0) => p0
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
.toList(),
prefetchHooksCallback: null,
));
}
typedef $$NoticeAcknowledgementsTableProcessedTableManager
= ProcessedTableManager<
_$SchedulerDb,
$NoticeAcknowledgementsTable,
NoticeAcknowledgementRow,
$$NoticeAcknowledgementsTableFilterComposer,
$$NoticeAcknowledgementsTableOrderingComposer,
$$NoticeAcknowledgementsTableAnnotationComposer,
$$NoticeAcknowledgementsTableCreateCompanionBuilder,
$$NoticeAcknowledgementsTableUpdateCompanionBuilder,
(
NoticeAcknowledgementRow,
BaseReferences<_$SchedulerDb, $NoticeAcknowledgementsTable,
NoticeAcknowledgementRow>
),
NoticeAcknowledgementRow,
PrefetchHooks Function()>;
class $SchedulerDbManager {
final _$SchedulerDb _db;
$SchedulerDbManager(this._db);
$$TasksTableTableManager get tasks =>
$$TasksTableTableManager(_db, _db.tasks);
$$TaskActivitiesTableTableManager get taskActivities =>
$$TaskActivitiesTableTableManager(_db, _db.taskActivities);
$$ProjectsTableTableManager get projects =>
$$ProjectsTableTableManager(_db, _db.projects);
$$ProjectStatisticsTableTableTableManager get projectStatisticsTable =>
$$ProjectStatisticsTableTableTableManager(
_db, _db.projectStatisticsTable);
$$LockedBlocksTableTableManager get lockedBlocks =>
$$LockedBlocksTableTableManager(_db, _db.lockedBlocks);
$$LockedOverridesTableTableManager get lockedOverrides =>
$$LockedOverridesTableTableManager(_db, _db.lockedOverrides);
$$SettingsTableTableTableManager get settingsTable =>
$$SettingsTableTableTableManager(_db, _db.settingsTable);
$$SnapshotsTableTableManager get snapshots =>
$$SnapshotsTableTableManager(_db, _db.snapshots);
$$ApplicationOperationsTableTableManager get applicationOperations =>
$$ApplicationOperationsTableTableManager(_db, _db.applicationOperations);
$$NoticeAcknowledgementsTableTableManager get noticeAcknowledgements =>
$$NoticeAcknowledgementsTableTableManager(
_db, _db.noticeAcknowledgements);
}