File
|
address
|
Type : string
|
Decorators :
@Prop({required: true, unique: true, index: true})
|
|
|
|
privateKey
|
Type : string
|
Decorators :
@Prop({required: true})
|
|
|
import { Document } from "mongoose";
import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
export type CustodialDocument = Custodial & Document;
@Schema({
strict: true,
timestamps: { createdAt: "created", updatedAt: "updated" },
})
export class Custodial {
@Prop({ required: true, unique: true, index: true })
address: string;
@Prop({ required: true })
privateKey: string;
}
export const CustodialSchema = SchemaFactory.createForClass(Custodial);