AccountEmailSqlDao.sql.stg

41 lines | 708 B Blame History Raw Download
group account_emails: EntitySqlDao;


tableFields(prefix) ::= <<
  account_id
, email
, created_by
, created_date
, updated_by
, updated_date
>>


tableValues() ::= <<
  :accountId
, :email
, :createdBy
, :createdDate
, :updatedBy
, :updatedDate
 >>

 historyTableName() ::= "account_email_history"

updateFromTransaction() ::= <<
    UPDATE account_emails
    SET email = :email, updated_by = :userName, updated_date = :updatedDate
    WHERE id = :id <AND_CHECK_TENANT()>;
>>

deleteFromTransaction() ::= <<
    DELETE FROM account_emails
    WHERE id = :id <AND_CHECK_TENANT()>;
>>


getByAccountId() ::= <<
    SELECT <fields()> FROM account_emails WHERE account_id = :accountId <AND_CHECK_TENANT()>;
>>