Ghost/ghost/admin/app/models/collection.js
Naz cc4ff8c6d4 Added collections CRUD UI
refs https://github.com/TryGhost/Team/issues/3168

- This is basic scaffolding for collection resources UI in Admin. For the most part it's a copy-paste of tags code with slight modifications to fit the collections usecase
2023-05-23 17:26:47 +07:00

22 lines
640 B
JavaScript

import Model, {attr} from '@ember-data/model';
import ValidationEngine from 'ghost-admin/mixins/validation-engine';
import {inject as service} from '@ember/service';
export default Model.extend(ValidationEngine, {
validationType: 'collection',
title: attr('string'),
slug: attr('string'),
description: attr('string'),
type: attr('string', {defaultValue: 'manual'}),
filter: attr('string'),
featureImage: attr('string'),
createdAtUTC: attr('moment-utc'),
updatedAtUTC: attr('moment-utc'),
createdBy: attr('number'),
updatedBy: attr('number'),
count: attr('raw'),
feature: service()
});