export const CompanySchema = new Schema<ICoreCompany>({
code: {
type: String,
required: true
},
name: {
type: String,
required: true
},
unit: {
type: String,
required: true
},
identificationNumber: {
type: String,
required: true
},
taxCategory: {
type: String,
required: false
},
activitiesStartDate: {
type: Date,
required: false
},
address: {
type: String,
required: true
},
legalAddress: {
type: String,
required: true
},
city: {
type: String,
required: true
},
province: {
type: String,
required: true
},
country: {
type: String,
required: true
},
phone: {
type: String,
required: true
},
email: {
type: String,
required: true
},
clientSecret: {
type: String,
required: true
},
active: {
type: Boolean,
required: true
},
testMode: {
type: Boolean,
required: true
},
authType: {
type: String,
default: "std",
enum: ["std", "saml2"],
required: true
},
samlMetadataUrl: {
type: String,
required: false
},
classificationCompany: { type: String, required: true },
verified: { type: Boolean, required: true },
credentialExpirationTime: { type: Date, required: true },
activitiesStartDate: { type: Date, required: true },
privateKey: { type: String, required: false },
taxCategories: { type: [String], required: true },
certificate: String,
postalCode: { type: String, required: true },
})
//complementar con esto