import { ExcludeAttributes } from '../../typings' ; import { User } from '../model/user' ; export function queryOptions ( ) { return { attributes : { exclude : [ 'updatedAt' , 'createdAt' , 'deletedAt' , 'creator' , 'modifier' ] , } , } ; } interface CreateOperation { creator : string ; modifier : string ; } export function createOptions < T > ( options , user ) { return { ... options , creator : user . account , modifier : user . account , } ; } interface UpdateOperation { modifier : string ; } export function updateOptions < T > ( options , user ) { return { ... options , modifier : user . account , } ; } const SqlUtils = { queryOptions , createOptions , updateOptions , } ; export default SqlUtils ;