Here, you'll find key exports for managing codes. These exports allow you to create, update and delete codes as needed.
type Code = {
id: number,
name: string,
description: string,
code: string,
createdAt: string
}
exports['redutzu-mdt']:SearchCode(id: number) // CodeType | null
exports['redutzu-mdt']:CreateCode({
name = 'Code name',
description = 'Code description',
code = '1-101'
}) -- number (id)
-- It returns a boolean (if it was successfully updated)
exports['redutzu-mdt']:UpdateCode(id, { name = 'New code name' }) -- boolean
-- It returns a boolean (if it was successfully deleted)
exports['redutzu-mdt']:DeleteCode(id: number) // boolean