// SIGNED-SOURCE: <0bc73a2573f5463bd22a4b3fce856a98> /** * AUTO-GENERATED FILE * Do not modify. Update your schema and re-generate for changes. */ import PlaylistTrack from "../PlaylistTrack.js"; import { default as s } from "./PlaylistTrackSpec.js"; import { P } from "@aphro/runtime-ts"; import { UpdateMutationBuilder } from "@aphro/runtime-ts"; import { CreateMutationBuilder } from "@aphro/runtime-ts"; import { DeleteMutationBuilder } from "@aphro/runtime-ts"; import { makeSavable } from "@aphro/runtime-ts"; import { modelGenMemo } from "@aphro/runtime-ts"; import { Edge } from "@aphro/runtime-ts"; import { EdgeSpecWithCreate } from "@aphro/runtime-ts"; import { SID_of } from "@aphro/runtime-ts"; import PlaylistTrackQuery from "./PlaylistTrackQuery.js"; import { Context } from "@aphro/runtime-ts"; import Playlist from "../Playlist.js"; import Track from "../Track.js"; export type Data = { id1: SID_of; id2: SID_of; }; // @Sealed(PlaylistTrack) export default abstract class PlaylistTrackBase extends Edge { readonly spec = s as unknown as EdgeSpecWithCreate; get id1(): SID_of { return this.data.id1; } get id2(): SID_of { return this.data.id2; } get id(): SID_of { return (this.data.id1 + "-" + this.data.id2) as SID_of; } static queryAll(ctx: Context): PlaylistTrackQuery { return PlaylistTrackQuery.create(ctx); } update(data: Partial) { return makeSavable( this.ctx, new UpdateMutationBuilder(this.ctx, this.spec, this) .set(data) .toChangesets()[0] ); } static create(ctx: Context, data: Partial) { return makeSavable( ctx, new CreateMutationBuilder(ctx, s).set(data).toChangesets()[0] ); } delete() { return makeSavable( this.ctx, new DeleteMutationBuilder(this.ctx, this.spec, this).toChangesets()[0] ); } }