2023-09-07 15:59:59 +01:00
|
|
|
import _ from 'lodash';
|
|
|
|
|
|
|
|
import { StackType } from '@/react/common/stacks/types';
|
|
|
|
import { ResourceControlViewModel } from '@/react/portainer/access-control/models/ResourceControlViewModel';
|
|
|
|
|
2024-10-08 17:13:14 +02:00
|
|
|
import { IResource } from '../../components/datatables/createOwnershipColumn';
|
2023-09-07 15:59:59 +01:00
|
|
|
|
|
|
|
export class ExternalStackViewModel implements IResource {
|
|
|
|
Id: string;
|
|
|
|
|
|
|
|
Name: string;
|
|
|
|
|
|
|
|
ResourceControl?: ResourceControlViewModel;
|
|
|
|
|
|
|
|
Type: StackType;
|
|
|
|
|
|
|
|
CreationDate: number;
|
|
|
|
|
|
|
|
CreatedBy?: string;
|
|
|
|
|
|
|
|
UpdateDate?: number;
|
|
|
|
|
|
|
|
UpdatedBy?: string;
|
|
|
|
|
|
|
|
External: boolean;
|
|
|
|
|
|
|
|
constructor(name: string, type: StackType, creationDate: number) {
|
|
|
|
this.Id = `external-stack_${_.uniqueId()}`;
|
|
|
|
this.Name = name;
|
|
|
|
this.Type = type;
|
|
|
|
this.CreationDate = creationDate;
|
|
|
|
|
|
|
|
this.External = true;
|
|
|
|
}
|
|
|
|
}
|