joystream-media-location.model.ts 585 B

12345678910111213141516171819202122
  1. import { BaseModel, Model, ManyToOne, StringField } from 'warthog';
  2. import { Block } from '../block/block.model';
  3. @Model({ api: {} })
  4. export class JoystreamMediaLocation extends BaseModel {
  5. @StringField({
  6. description: `Id of the data object in the Joystream runtime dataDirectory module`,
  7. unique: true,
  8. })
  9. dataObjectId!: string;
  10. @ManyToOne(() => Block, (param: Block) => param.joystreamMediaLocations, {
  11. skipGraphQLField: true,
  12. })
  13. happenedIn!: Block;
  14. constructor(init?: Partial<JoystreamMediaLocation>) {
  15. super();
  16. Object.assign(this, init);
  17. }
  18. }