mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 20:59:28 -05:00
some basic views
This commit is contained in:
141
vue3/models/InviteLink.ts
Normal file
141
vue3/models/InviteLink.ts
Normal file
@@ -0,0 +1,141 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import type { InviteLinkGroup } from './InviteLinkGroup';
|
||||
import {
|
||||
InviteLinkGroupFromJSON,
|
||||
InviteLinkGroupFromJSONTyped,
|
||||
InviteLinkGroupToJSON,
|
||||
} from './InviteLinkGroup';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface InviteLink
|
||||
*/
|
||||
export interface InviteLink {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof InviteLink
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof InviteLink
|
||||
*/
|
||||
readonly uuid?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof InviteLink
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
*
|
||||
* @type {InviteLinkGroup}
|
||||
* @memberof InviteLink
|
||||
*/
|
||||
group: InviteLinkGroup;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof InviteLink
|
||||
*/
|
||||
validUntil?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof InviteLink
|
||||
*/
|
||||
usedBy?: number | null;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof InviteLink
|
||||
*/
|
||||
reusable?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof InviteLink
|
||||
*/
|
||||
internalNote?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof InviteLink
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof InviteLink
|
||||
*/
|
||||
readonly createdAt?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the InviteLink interface.
|
||||
*/
|
||||
export function instanceOfInviteLink(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "group" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function InviteLinkFromJSON(json: any): InviteLink {
|
||||
return InviteLinkFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function InviteLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteLink {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'uuid': !exists(json, 'uuid') ? undefined : json['uuid'],
|
||||
'email': !exists(json, 'email') ? undefined : json['email'],
|
||||
'group': InviteLinkGroupFromJSON(json['group']),
|
||||
'validUntil': !exists(json, 'valid_until') ? undefined : (new Date(json['valid_until'])),
|
||||
'usedBy': !exists(json, 'used_by') ? undefined : json['used_by'],
|
||||
'reusable': !exists(json, 'reusable') ? undefined : json['reusable'],
|
||||
'internalNote': !exists(json, 'internal_note') ? undefined : json['internal_note'],
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
|
||||
};
|
||||
}
|
||||
|
||||
export function InviteLinkToJSON(value?: InviteLink | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'email': value.email,
|
||||
'group': InviteLinkGroupToJSON(value.group),
|
||||
'valid_until': value.validUntil === undefined ? undefined : (value.validUntil.toISOString().substring(0,10)),
|
||||
'used_by': value.usedBy,
|
||||
'reusable': value.reusable,
|
||||
'internal_note': value.internalNote,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user