* refactor(medusa): Move some column to a base entity to make it easier to add new models without forgetting some columns * styles(medusa): Cleanup models * fix(medusa): typings due to model typings update * feat(medusa): Cleanup models * fix(medusa): A model must not return the generateId as part of the entity * fix(medusa): Plugin integration snapshot * fix(medusa): Typings from discount-rule-migration scripts * refactor(medusa): Introduct BaseEntity/SoftDeletableEntity that the entity extends * styles(medusa): Fix models linting * test(medusa): Fix integration plugin tests * feat(medusa): Create generateEntityId standalong function utility and update config to properly supprt ts spec files * feat(medusa): Update entities to use the new utils to generate and apply the id * test(medusa): Fix test suits * feat(medusa): Improve generateEntityId utility
25 lines
708 B
TypeScript
25 lines
708 B
TypeScript
import { Column, Entity, PrimaryColumn } from "typeorm"
|
|
|
|
@Entity()
|
|
export class PaymentProvider {
|
|
@PrimaryColumn()
|
|
id: string
|
|
|
|
@Column({ default: true })
|
|
is_installed: boolean
|
|
}
|
|
|
|
/**
|
|
* @schema payment_provider
|
|
* title: "Payment Provider"
|
|
* description: "Represents a Payment Provider plugin and holds its installation status."
|
|
* x-resourceId: payment_provider
|
|
* properties:
|
|
* id:
|
|
* description: "The id of the payment provider as given by the plugin."
|
|
* type: string
|
|
* is_installed:
|
|
* description: "Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`."
|
|
* type: boolean
|
|
*/
|