AccountEmailSqlDao.sql.stg

39 lines | 558 B Blame History Raw Download
group AccountEmailSqlDao: EntitySqlDao;

tableName() ::= "account_emails"

historyTableName() ::= "account_email_history"

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


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

getEmailByAccountId() ::= <<
select
<allTableFields()>
from <tableName()>
where account_id = :accountId
<AND_CHECK_TENANT()>
;
>>

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